示例#1
0
 def _raiseRoleExistsException(self,rolename):
     '''
     Raised when a user with the given username exists 
     '''
     msg = str(QApplication.translate("RoleNameError","'%s' role already exists."
                                                      "Please specify another name for the role."%(rolename,)))
     raise SecurityException(msg)
示例#2
0
 def _raiseUserNameException(self):
     '''
     Raised when a username condition is not met 
     '''
     msg = str(
         QApplication.translate(
             "UsernameError",
             "Username length must be equal to or greater than %s characters"
             % (str(self._minUserLength, ))))
     raise SecurityException(msg)
示例#3
0
 def _raiseUserExistsException(self, username):
     '''
     Raised when a user with the given username exists 
     '''
     msg = str(
         QApplication.translate(
             "UserAccountError",
             "'%s' account already exists.Please specify another username."
             % (username, )))
     raise SecurityException(msg)
示例#4
0
 def _raisePasswordException(self):
     '''
     Raised when a password condition is not met 
     '''
     msg = str(
         QApplication.translate(
             "PasswordError",
             "Password length must be equal to or greater than %s characters"
             % (str(self._minPassLength, ))))
     raise SecurityException(msg)