示例#1
0
文件: Admin.py 项目: samircury/WMCore
 def user(self, userName):
     """ Web page of details about the user. """
     self.validate(userName)
     groups = GroupInfo.groupsForUser(userName).keys()
     requests = UserRequests.listRequests(userName).keys()
     allGroups = GroupInfo.listGroups()
     self.validate(groups)
     self.validate(requests)
     self.validate(allGroups)
     return self.templatepage("User", user=userName, groups=groups,
         allGroups=allGroups, requests=requests)
示例#2
0
文件: Admin.py 项目: stuartw/WMCore
 def user(self, userName):
     """ Web page of details about the user, and sets user priority """
     self.validate(userName)
     groups = GroupInfo.groupsForUser(userName).keys()
     requests = UserRequests.listRequests(userName).keys()
     priority = UserManagement.getPriority(userName)
     allGroups = GroupInfo.listGroups()
     self.validate(groups)
     self.validate(requests)
     self.validate(allGroups)
     return self.templatepage("User", user=userName, groups=groups, 
         allGroups=allGroups, requests=requests, priority=priority)
示例#3
0
 def getUser(self, userName = None, group = None):
     """ No args returns a list of all users.  Group returns groups this user is in.  Username
         returs a JSON with information about the user """
     if userName != None:
         if not Registration.isRegistered(userName):
             raise cherrypy.HTTPError(404, "Cannot find user")
         result = {}
         result['groups'] = GroupInfo.groupsForUser(userName).keys()
         result['requests'] = UserRequests.listRequests(userName).keys()
         result.update(Registration.userInfo(userName))
         return result
     elif group != None:
         GroupInfo.usersInGroup(group)
     else:
         return Registration.listUsers()
示例#4
0
 def getUser(self, userName=None, group=None):
     """ No args returns a list of all users.  Group returns groups this user is in.  Username
         returs a JSON with information about the user """
     if userName != None:
         if not Registration.isRegistered(userName):
             raise cherrypy.HTTPError(404, "Cannot find user")
         result = {}
         result['groups'] = GroupInfo.groupsForUser(userName).keys()
         result['requests'] = UserRequests.listRequests(userName).keys()
         result.update(Registration.userInfo(userName))
         return result
     elif group != None:
         GroupInfo.usersInGroup(group)
     else:
         return Registration.listUsers()
示例#5
0
 def user(self, userName):
     """ Web page of details about the user, and sets user priority """
     self.validate(userName)
     groups = GroupInfo.groupsForUser(userName).keys()
     requests = UserRequests.listRequests(userName).keys()
     priority = UserManagement.getPriority(userName)
     allGroups = GroupInfo.listGroups()
     self.validate(groups)
     self.validate(requests)
     self.validate(allGroups)
     return self.templatepage("User",
                              user=userName,
                              groups=groups,
                              allGroups=allGroups,
                              requests=requests,
                              priority=priority)