Skip to content

Commit

Permalink
add documentation for magic numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Bell committed Apr 19, 2011
1 parent 06549c9 commit 71aa711
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
29 changes: 29 additions & 0 deletions lib/WebGUI/Group.pm
Expand Up @@ -71,6 +71,35 @@ This package provides an object-oriented way of managing WebGUI groups and group
$boolean = $group->userIsAdmin($userId,$groupId);
$epoch = $group->userGroupExpireDate($userId,$date);
=head1 MAGIC NUMBERS
These magic group IDs are used throughout WebGUI:
=over 4
=item 1
The visitors group. Only visitors are in this group, not registered users.
=item 2
The registered users group. Any user that is not a visitor is in this group.
=item 3
The admins group. This is the highest level of authority that can be given in
the site.
=item 7
Everyone. All Visitors and Registered Users are in this group.
=item 12
Turn Admin On group. This group is allowed to use the Admin interface.
=back
=head1 METHODS
These methods are available from this class:
Expand Down
16 changes: 16 additions & 0 deletions lib/WebGUI/User.pm
Expand Up @@ -70,6 +70,22 @@ as getting/setting a users's profile data.
WebGUI::User->validUserId($session, $userId);
=head1 MAGIC NUMBERS
These magic user IDs are used throughout WebGUI
=over 4
=item 1
Visitor. Any user that is not logged-in is a Visitor.
=item 3
Admin. This is the main site admin account.
=back
=head1 METHODS
These methods are available from this class:
Expand Down

0 comments on commit 71aa711

Please sign in to comment.