[Rt-commit] r11046 - rt/branches/3.8-TESTING/lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Tue Mar 11 19:19:10 EDT 2008


Author: ruz
Date: Tue Mar 11 19:19:09 2008
New Revision: 11046

Modified:
   rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm

Log:
* delete {{{ }}} comments

Modified: rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm	(original)
+++ rt/branches/3.8-TESTING/lib/RT/User_Overlay.pm	Tue Mar 11 19:19:09 2008
@@ -74,9 +74,6 @@
 use RT::Interface::Email;
 use Encode;
 
-# {{{ sub _Accessible 
-
-
 sub _OverlayAccessible {
     {
 
@@ -101,10 +98,6 @@
 
 
 
-# }}}
-
-# {{{ sub Create 
-
 =head2 Create { PARAMHASH }
 
 
@@ -272,12 +265,6 @@
     return ( $id, $self->loc('User created') );
 }
 
-# }}}
-
-
-
-# {{{ SetPrivileged
-
 =head2 SetPrivileged BOOL
 
 If passed a true value, makes this user a member of the "Privileged"  PseudoGroup.
@@ -355,10 +342,6 @@
     }
 }
 
-# }}}
-
-# {{{ Privileged
-
 =head2 Privileged
 
 Returns true if this user is privileged. Returns undef otherwise.
@@ -377,10 +360,6 @@
     }
 }
 
-# }}}
-
-# {{{ sub _BootstrapCreate 
-
 #create a user without validating _any_ data.
 
 #To be used only on database init.
@@ -430,10 +409,6 @@
     return ( $id, 'User created' );
 }
 
-# }}}
-
-# {{{ sub Delete 
-
 sub Delete {
     my $self = shift;
 
@@ -441,10 +416,6 @@
 
 }
 
-# }}}
-
-# {{{ sub Load 
-
 =head2 Load
 
 Load a user object from the database. Takes a single argument.
@@ -470,15 +441,10 @@
     }
 }
 
-# }}}
-
-# {{{ sub LoadByEmail
-
 =head2 LoadByEmail
 
 Tries to load this user object from the database by the user's email address.
 
-
 =cut
 
 sub LoadByEmail {
@@ -496,10 +462,6 @@
     return $self->LoadByCol( "EmailAddress", $address );
 }
 
-# }}}
-
-# {{{ LoadOrCreateByEmail 
-
 =head2 LoadOrCreateByEmail ADDRESS
 
 Attempts to find a user who has the provided email address. If that fails, creates an unprivileged user with
@@ -555,10 +517,6 @@
     return ($self->Id, $message);
 }
 
-# }}}
-
-# {{{ sub ValidateEmailAddress
-
 =head2 ValidateEmailAddress ADDRESS
 
 Returns true if the email address entered is not in use by another user or is 
@@ -586,12 +544,6 @@
     }
 }
 
-# }}}
-
-# {{{ sub CanonicalizeEmailAddress
-
-
-
 =head2 CanonicalizeEmailAddress ADDRESS
 
 CanonicalizeEmailAddress converts email addresses into canonical form.
@@ -616,13 +568,6 @@
     return ($email);
 }
 
-
-# }}}
-
-# {{{ sub CanonicalizeUserInfo
-
-
-
 =head2 CanonicalizeUserInfo HASH of ARGS
 
 CanonicalizeUserInfo can convert all User->Create options.
@@ -643,14 +588,9 @@
 }
 
 
-# }}}
-
+=head2 Password related functions
 
-# {{{ Password related functions
-
-# {{{ sub SetRandomPassword
-
-=head2 SetRandomPassword
+=head3 SetRandomPassword
 
 Takes no arguments. Returns a status code and a new password or an error message.
 If the status is 1, the second value returned is the new password.
@@ -683,11 +623,7 @@
 
 }
 
-# }}}
-
-# {{{ sub ResetPassword
-
-=head2 ResetPassword
+=head3 ResetPassword
 
 Returns status, [ERROR or new password].  Resets this user\'s password to
 a randomly generated pronouncable password and emails them, using a 
@@ -726,11 +662,7 @@
 
 }
 
-# }}}
-
-# {{{ sub GenerateRandomPassword
-
-=head2 GenerateRandomPassword MIN_LEN and MAX_LEN
+=head3 GenerateRandomPassword MIN_LEN and MAX_LEN
 
 Returns a random password between MIN_LEN and MAX_LEN characters long.
 
@@ -916,11 +848,7 @@
     return ($i);
 }
 
-# }}}
-
-# {{{ sub SetPassword
-
-=head2 SetPassword
+=head3 SetPassword
 
 Takes a string. Checks the string's length and sets this user's password 
 to that string.
@@ -956,7 +884,7 @@
 
 }
 
-=head2 _GeneratePassword PASSWORD
+=head3 _GeneratePassword PASSWORD
 
 returns an MD5 hash of the password passed in, in hexadecimal encoding.
 
@@ -972,7 +900,7 @@
 
 }
 
-=head2 _GeneratePasswordBase64 PASSWORD
+=head3 _GeneratePasswordBase64 PASSWORD
 
 returns an MD5 hash of the password passed in, in base64 encoding
 (obsoleted now).
@@ -989,16 +917,12 @@
 
 }
 
-# }}}
-
-                                                                                
-=head2 HasPassword
+=head3 HasPassword
                                                                                 
 Returns true if the user has a valid password, otherwise returns false.         
                                                                                
 =cut
 
-
 sub HasPassword {
     my $self = shift;
     my $pwd = $self->__Value('Password');
@@ -1008,10 +932,7 @@
     return 1;
 }
 
-
-# {{{ sub IsPassword 
-
-=head2 IsPassword
+=head3 IsPassword
 
 Returns true if the passed in value is this user's password.
 Returns undef otherwise.
@@ -1058,12 +979,6 @@
     return (undef);
 }
 
-# }}}
-
-# }}}
-
-# {{{ sub SetDisabled
-
 =head2 Sub SetDisabled
 
 Toggles the user's disabled flag.
@@ -1073,8 +988,6 @@
 
 =cut 
 
-# }}}
-
 sub SetDisabled {
     my $self = shift;
     unless ( $self->CurrentUser->HasRight(Right => 'AdminUsers', Object => $RT::System) ) {
@@ -1089,18 +1002,14 @@
 }
 
 
-# {{{ Principal related routines
-
 =head2 PrincipalObj 
 
 Returns the principal object for this user. returns an empty RT::Principal
 if there's no principal object matching this user. 
 The response is cached. PrincipalObj should never ever change.
 
-
 =cut
 
-
 sub PrincipalObj {
     my $self = shift;
 
@@ -1133,12 +1042,6 @@
     return $self->Id;
 }
 
-# }}}
-
-
-
-# {{{ sub HasGroupRight
-
 =head2 HasGroupRight
 
 Takes a paramhash which can contain
@@ -1169,14 +1072,11 @@
         $args{'GroupObj'}->Load( $args{'Group'} );
     }
 
-    # {{{ Validate and load up the GroupId
+    # Validate and load up the GroupId
     unless ( ( defined $args{'GroupObj'} ) and ( $args{'GroupObj'}->Id ) ) {
         return undef;
     }
 
-    # }}}
-
-
     # Figure out whether a user has the right we're asking about.
     my $retval = $self->HasRight(
         Object => $args{'GroupObj'},
@@ -1184,14 +1084,8 @@
     );
 
     return ($retval);
-
-
 }
 
-# }}}
-
-# {{{ sub OwnGroups 
-
 =head2 OwnGroups
 
 Returns a group collection object containing the groups of which this
@@ -1208,21 +1102,6 @@
     return $groups;
 }
 
-# }}}
-
-# {{{ sub Rights testing
-
-=head1 Rights testing
-
-
-
-=cut
-
-# }}}
-
-
-# {{{ sub HasRight
-
 =head2 HasRight
 
 Shim around PrincipalObj->HasRight. See RT::Principal
@@ -1230,15 +1109,10 @@
 =cut
 
 sub HasRight {
-
     my $self = shift;
     return $self->PrincipalObj->HasRight(@_);
 }
 
-# }}}
-
-# {{{ sub CurrentUserCanModify
-
 =head2 CurrentUserCanModify RIGHT
 
 If the user has rights for this object, either because
@@ -1276,10 +1150,6 @@
 
 }
 
-# }}}
-
-# {{{ sub CurrentUserHasRight
-
 =head2 CurrentUserHasRight
   
 Takes a single argument. returns 1 if $Self->CurrentUser
@@ -1294,8 +1164,6 @@
     return ( $self->CurrentUser->HasRight(Right => $right, Object => $RT::System) );
 }
 
-# }}}
-
 sub _PrefName {
     my $name = shift;
     if (ref $name) {
@@ -1305,13 +1173,11 @@
     return 'Pref-'.$name;
 }
 
-# {{{ sub Preferences
-
 =head2 Preferences NAME/OBJ DEFAULT
 
-  Obtain user preferences associated with given object or name.
-  Returns DEFAULT if no preferences found.  If DEFAULT is a hashref,
-  override the entries with user preferences.
+Obtain user preferences associated with given object or name.
+Returns DEFAULT if no preferences found.  If DEFAULT is a hashref,
+override the entries with user preferences.
 
 =cut
 
@@ -1339,13 +1205,9 @@
     return $content;
 }
 
-# }}}
-
-# {{{ sub SetPreferences
-
 =head2 SetPreferences NAME/OBJ VALUE
 
-  Set user preferences associated with given object or name.
+Set user preferences associated with given object or name.
 
 =cut
 
@@ -1363,9 +1225,6 @@
     }
 }
 
-# }}}
-
-
 =head2 WatchedQueues ROLE_LIST
 
 Returns a RT::Queues object containing every queue watched by the user.
@@ -1435,9 +1294,6 @@
 
 }
 
-
-# {{{ sub _CleanupInvalidDelegations
-
 =head2 _CleanupInvalidDelegations { InsideTransaction => undef }
 
 Revokes all ACE entries delegated by this user which are inconsistent
@@ -1505,10 +1361,6 @@
     return (1);
 }
 
-# }}}
-
-# {{{ sub _Set
-
 sub _Set {
     my $self = shift;
 
@@ -1555,10 +1407,6 @@
     }
 }
 
-# }}}
-
-# {{{ sub _Value 
-
 =head2 _Value
 
 Takes the name of a table column.
@@ -1600,13 +1448,9 @@
 
 }
 
-# }}}
-
-# {{{ sub FriendlyName
-
 =head2 FriendlyName
 
-  Return the friendly name
+Return the friendly name
 
 =cut
 
@@ -1617,8 +1461,6 @@
     return "";
 }
 
-# }}}
-
 =head2 PreferredKey
 
 Returns the preferred key of the user. If none is set, then this will query


More information about the Rt-commit mailing list