Mercurial > p > roundup > code
comparison roundup/security.py @ 5127:425b4c4fc345
issue2550831: Make the classic template query.edit page work.
More edits:
1) Admin was unable to restore a deleted query but could retire it.
Add 'restore' security permission to admin in security.py.
This seems like it should be a standard perm.
2) If a search you had in your "Your Queries" list was made private
to somebody else, you lost the ability to drop it from your list.
Modified the query.edit.html so that re-private and retired
queries are listed at the bottom and you can uninstall them.
Ideally a re-privated query should just dissapear from your listing.
issue2550915 opened to track this.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 03 Jul 2016 22:50:53 -0400 |
| parents | 87b0358790ed |
| children | 4058fc1ec746 |
comparison
equal
deleted
inserted
replaced
| 5126:dd642afb4440 | 5127:425b4c4fc345 |
|---|---|
| 124 self.addRole(name="User", description="A regular user, no privs") | 124 self.addRole(name="User", description="A regular user, no privs") |
| 125 self.addRole(name="Admin", description="An admin user, full privs") | 125 self.addRole(name="Admin", description="An admin user, full privs") |
| 126 self.addRole(name="Anonymous", description="An anonymous user") | 126 self.addRole(name="Anonymous", description="An anonymous user") |
| 127 | 127 |
| 128 # default permissions - Admin may do anything | 128 # default permissions - Admin may do anything |
| 129 for p in 'create edit retire view'.split(): | 129 for p in 'create edit restore retire view'.split(): |
| 130 p = self.addPermission(name=p.title(), | 130 p = self.addPermission(name=p.title(), |
| 131 description="User may %s everything"%p) | 131 description="User may %s everything"%p) |
| 132 self.addPermissionToRole('Admin', p) | 132 self.addPermissionToRole('Admin', p) |
| 133 | 133 |
| 134 # initialise the permissions and roles needed for the UIs | 134 # initialise the permissions and roles needed for the UIs |
