Fix bug where Admins are not in the Visitor group. Add a test to verify this going forward.
This commit is contained in:
parent
f3a1f0f9f2
commit
dae8c4c22f
3 changed files with 15 additions and 1 deletions
|
|
@ -14,6 +14,7 @@
|
|||
subscriptions per the laws in various countries.
|
||||
- fix: MultiSearch
|
||||
- fix: Unable to duplicate existing Session Id
|
||||
- fix: Admins not in visitors group
|
||||
|
||||
|
||||
7.0.1
|
||||
|
|
|
|||
|
|
@ -21,9 +21,16 @@ my $quiet; # this line required
|
|||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
addAdminToVisitorGroup($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
sub addAdminToVisitorGroup {
|
||||
my $session = shift;
|
||||
my $Visitor = WebGUI::Group->new($session, '1');
|
||||
$Visitor->addGroups([3]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
##-------------------------------------------------
|
||||
#sub exampleFunction {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ my @ipTests = (
|
|||
);
|
||||
|
||||
|
||||
plan tests => (118 + scalar(@scratchTests) + scalar(@ipTests)); # increment this value for each test you create
|
||||
plan tests => (119 + scalar(@scratchTests) + scalar(@ipTests)); # increment this value for each test you create
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
my $testCache = WebGUI::Cache->new($session, 'myTestKey');
|
||||
|
|
@ -518,6 +518,12 @@ ok( !$cacheDude->isInGroup($gZ->getId), "Cache dude is not a member of group Z")
|
|||
ok( !$cacheDude->isInGroup($gA->getId), "Cache dude is not a member of group A");
|
||||
ok( !$cacheDude->isInGroup($gB->getId), "Cache dude is not a member of group B");
|
||||
|
||||
##Admin group inclusion check.
|
||||
|
||||
my $vgroup = WebGUI::Group->new($session, 1);
|
||||
my $vgroups = $vgroup->getGroupsIn();
|
||||
ok( isIn(3, @{ $vgroups }), 'Admin Group is in Group Visitor');
|
||||
|
||||
SKIP: {
|
||||
skip("need to test expiration date in groupings interacting with recursive or not", 1);
|
||||
ok(undef, "expiration date in groupings for getUser");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue