#13289 closed enhancement (fixed)
Hide submit and delete buttons when not applicable to the current user
Reported by: | Richard Lyders | Owned by: | Cauly |
---|---|---|---|
Priority: | normal | Component: | AccreditationPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.2 |
Description
To hide the submit and delete buttons when they couldn't be used by the current user, I updated Accreditation.py.
Specific changes:
- get_delete_btn: new function to return the HTML for a delete button for an accreditation record only if the user has permissions to delete
- get_topic_submit_change_btn: new function to return the HTML for a submit button for a change to an existing accreditation record only if the user is one of the authors in the list for the topic's list of authors
Attachments (2)
Change History (9)
Changed 7 years ago by
Attachment: | Accreditation.py added |
---|
comment:1 follow-up: 3 Changed 7 years ago by
comment:2 follow-up: 4 Changed 7 years ago by
It customary to submit patches rather than attaching the whole file (TracDev/SubmittingPatches).
comment:3 Changed 7 years ago by
comment:4 follow-up: 6 Changed 7 years ago by
Replying to Ryan J Ollos:
It customary to submit patches rather than attaching the whole file (TracDev/SubmittingPatches).
Great! I reviewed many pages of help and couldn't find how to submit a patch. I'll do that.
Changed 7 years ago by
Attachment: | accreditationplugin-trunk-16851-adds-configs-btns-perms-redirects.diff added |
---|
This is the complete path that includes all my changes to date: configs for labels, ACCREDITATION_CREATE, ACCREDITATION_DELETE, redirects to wrapper, hide unusable buttons
comment:5 Changed 7 years ago by
Complete patch attached with all changes to date ... (the attachment description erroneously calls it a "complete path".
Thanks again for this plugin. We are getting some good use out of it.
comment:6 Changed 7 years ago by
Replying to Richard Lyders:
Replying to Ryan J Ollos:
It customary to submit patches rather than attaching the whole file (TracDev/SubmittingPatches).
I was in my Git mode of thinking and looking for help on "pull", "request", etc when I should have been looking for help with "submit" and "patch".
Hide submit and delete buttons when not applicable to the current user