Пример #1
0
def list_rights(ctx, org_name):
    try:
        client = ctx.obj['client']
        if org_name is None:
            org_name = ctx.obj['profiles'].get('org_in_use')
        org = Org(client, resource=client.get_org_by_name(org_name))
        right_records = org.list_rights()
        for right in right_records:
            del right['href']
        stdout(right_records, ctx)
    except Exception as e:
        stderr(e, ctx)
Пример #2
0
 def test_05_list_rights_in_org(self):
     logged_in_org = self.client.get_org()
     org = Org(self.client, resource=logged_in_org)
     right_record_list = org.list_rights()
     assert len(right_record_list) > 0