Opened 15 years ago
Last modified 12 years ago
#8036 closed enhancement
allow IPermissionRequestor to extend existing meta-permissions — at Version 8
Reported by: | Owned by: | Remy Blank | |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | general | Version: | 0.11.2.1 |
Severity: | normal | Keywords: | patch permission |
Cc: | felix.schwarz@…, leho@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Sometimes you might want to introduce a new kind of ticket permission, and add it to TICKET_ADMIN
without having to wholly redefine it. A good illustration comes from a test IPermissionRequestor
I have defined:
def get_permission_actions(self): return ['TEST_CREATE', 'TEST_DELETE', 'TEST_MODIFY', ('TEST_CREATE', []), ('TEST_ADMIN', ['TEST_CREATE', 'TEST_DELETE']), ('TEST_ADMIN', ['TEST_MODIFY'])]
Except with the imagination that TEST_CREATE
actually has something, and the TEST_ADMIN
variants are in separate IPermissionRequestor
s.
Change History (10)
by , 15 years ago
Attachment: | perm-action-alias-extension.diff added |
---|
comment:1 by , 15 years ago
Keywords: | patch added |
---|
The attached patch documents the extension to get_permission_actions
's capabilities, tweaks get_actions
and expand_actions
, mostly rewrites TicketSystem.get_user_permissions
, and a test support code change (shown in description) that causes test_meta_permissions
to fail if the remainder of the patch is not present.
comment:2 by , 15 years ago
Apologies, I forgot to remove the -
-lines from the diff. Here is the corrected example:
def get_permission_actions(self): return ['TEST_CREATE', 'TEST_DELETE', 'TEST_MODIFY', ('TEST_CREATE', []), ('TEST_ADMIN', ['TEST_CREATE', 'TEST_DELETE']), ('TEST_ADMIN', ['TEST_MODIFY'])]
comment:3 by , 15 years ago
Milestone: | → 0.13 |
---|
comment:4 by , 15 years ago
Keywords: | permission added |
---|
comment:6 by , 14 years ago
Cc: | added |
---|
what's necessary to get this patch in? I'd like to see this fixed. Is it just a code review that's missing?
comment:7 by , 14 years ago
Milestone: | next-major-0.1X → 0.13 |
---|---|
Priority: | normal → high |
A gentle push, as you just did :)
comment:8 by , 14 years ago
Description: | modified (diff) |
---|
by , 14 years ago
Attachment: | 8036-perm-extension-r10316.patch added |
---|
Updated patch, refactors parts of PermissionSystem
.
patch with unit testing