(self)
| 54 | self.revision = revision |
| 55 | |
| 56 | def display(self): |
| 57 | print('') |
| 58 | print('{0:>25s}: {1:<20s}'.format('Shared Folder UID', self.shared_folder_uid)) |
| 59 | print('{0:>25s}: {1}'.format('Name', self.name)) |
| 60 | print('{0:>25s}: {1}'.format('Default Manage Records', self.default_manage_records)) |
| 61 | print('{0:>25s}: {1}'.format('Default Manage Users', self.default_manage_users)) |
| 62 | print('{0:>25s}: {1}'.format('Default Can Edit', self.default_can_edit)) |
| 63 | print('{0:>25s}: {1}'.format('Default Can Share', self.default_can_share)) |
| 64 | |
| 65 | if len(self.records) > 0: |
| 66 | print('') |
| 67 | print('{0:>25s}:'.format('Record Permissions')) |
| 68 | for r in self.records: |
| 69 | print('{0:>25s}: {1}'.format(r['record_uid'], SharedFolder.record_permission_to_string(r))) |
| 70 | expiration = SharedFolder.expiration_to_string(r) |
| 71 | if expiration: |
| 72 | print('{0:>25s} {1}'.format('', expiration)) |
| 73 | |
| 74 | if len(self.users) > 0: |
| 75 | print('') |
| 76 | print('{0:>25s}:'.format('User Permissions')) |
| 77 | for u in self.users: |
| 78 | print('{0:>25s}: {1}'.format(u['username'], SharedFolder.user_permission_to_string(u))) |
| 79 | expiration = SharedFolder.expiration_to_string(u) |
| 80 | if expiration: |
| 81 | print('{0:>25s} {1}'.format('', expiration)) |
| 82 | |
| 83 | if len(self.teams) > 0: |
| 84 | print('') |
| 85 | print('{0:>25s}:'.format('Team Permissions')) |
| 86 | for t in self.teams: |
| 87 | print('{0:>25s}: {1}'.format(t['name'], SharedFolder.user_permission_to_string(t))) |
| 88 | expiration = SharedFolder.expiration_to_string(t) |
| 89 | if expiration: |
| 90 | print('{0:>25s} {1}'.format('', expiration)) |
| 91 | |
| 92 | if self.share_admins: |
| 93 | print('') |
| 94 | print('{0:>25s}:'.format('Share Administrators')) |
| 95 | for email in self.share_admins: |
| 96 | print('{0:>25s}: {1}'.format(email, 'Can Manage Users & Records')) |
| 97 | |
| 98 | print('') |
| 99 | |
| 100 | @staticmethod |
| 101 | def user_permission_to_string(permission): |
nothing calls this directly
no test coverage detected