In Storm Contrib we added a while ago a permission "view if project is assigned to team" for tickets, tasks and projects.
Maybe we could move this to storm?
Our use-case is that anyone can view and comment on all tickets, which his team works on.
Maybe also add edit and delete permissions, so others can set this to, if wanted.
Why the request to move this to storm?
It is hard to add additional permissions. What we do is to change the node_access function to our own in the hook_menu_alter, call the original node access function and if this return false, test if our case gets true. But for the ticket/task list this doesn't work, as this calls the stormticket_access_sql function directly, so there are missing tickets/task in this list. We added another page (my-tickets) to get around that (but not only because of this, also we wanted more information there, so this list won't get removed). For all the JS calls, we altered the function in the hook_menu_alter to our function, which is a copy of the original and only changes a view lines, to get this working.
In a nutshell its messy, what we do there and the original list and our list doesn't show the same content.
What are other opinions about this permission?
I'm clearly in favor to add this. ;)
I would write the patch of course.
Comment | File | Size | Author |
---|---|---|---|
#2 | storm_project_permission-1448818-2.patch | 28.15 KB | kfritsche |
Comments
Comment #1
juliangb CreditAttribution: juliangb commentedSounds like it would be much easier to have it in Storm.
Comment #2
kfritscheHere a patch, which would add these permissions.
Comment #3
kfritscheLink to the storm contrib patch: #1460662: Move Permission: "view if project is assigned to team" to Storm
And setting it to needs review.
Comment #4
juliangb CreditAttribution: juliangb commentedI've read through - looks sensible.
Is this something that we can put in some automated tests with? I'm just concerned that the access rules are getting quite sophisticated and want to prevent accidentally breaking it at some point in the future...
Comment #5
kfritscheThis issue shouldn't be commited before #1448764: Ticketlist doesn't show edit link
Once this happens, i will add tests here, so it will also test these additional permissions..
Comment #6
juliangb CreditAttribution: juliangb commented#2: storm_project_permission-1448818-2.patch queued for re-testing.