Пример #1
0
 def get(self):
     page, page_size = get_pagination_params()
     term = get_search_term()
     user_groups = user_group_api.get_user_groups(page_size,
                                                  (page - 1) * page_size,
                                                  term)
     return user_groups
Пример #2
0
 def get(self, server_id):
     server = server_api.get_server(server_id)
     no_access = request.args.get('no_access')
     if no_access:
         access = set(server.get_groups())
         all_user_groups = set(user_group_api.get_user_groups())
         return list(all_user_groups.difference(access))
     return server.get_groups()
Пример #3
0
   def get(self):
 #check if the user is admin   checkAdmin(user_id)
       return user_group_api.get_user_groups()
Пример #4
0
 def get(self):
     page, page_size = get_pagination_params()
     term = get_search_term()
     user_groups = user_group_api.get_user_groups(page_size, (page-1) * page_size, term)
     return user_groups