Beispiel #1
0
 def check_permission(self, user_name, host, external=False):
     rest = RestConnection(host)
     if external:
         content = rest.check_user_permission(user_name, 'password',
                                              'cluster.admin.external!all')
         return content['cluster.admin.external!all']
     else:
         content = rest.check_user_permission(user_name, 'password',
                                              'cluster.admin.internal!all')
         return content['cluster.admin.internal!all']
Beispiel #2
0
 def check_permission_external(self, user_name, host):
     rest = RestConnection(host)
     content = rest.check_user_permission(user_name, 'password',
                                          'cluster.admin.external!all')
     return content['cluster.admin.external!all']