Opened 19 years ago
Closed 18 years ago
#2483 closed enhancement (wontfix)
raising exceptions from macros
Reported by: | anonymous | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | wiki system | Version: | 0.9.2 |
Severity: | normal | Keywords: | permission, wiki, macro |
Cc: | m@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Per-page access permission is one of the ehancements I was planning for my company Trac instance, since we are going to open it for public access. It does depends of a small patch in mainline and is mostly based in a user-space wiki macro ('PagePermission'). Most of the code is contribution of matt_good & cmlenz, thank you both for the great help.
Attachments (2)
Change History (5)
by , 19 years ago
Attachment: | trac-reraising-macro-exceptions.diff added |
---|
comment:1 by , 19 years ago
Cc: | added |
---|
Wow, I need this badly. I just tested it and it workrs for me.
It would be nice to be able to use permission group names.
follow-up: 3 comment:2 by , 19 years ago
Summary: | Per-Page permission handling implemented as a wiki-macro → raising exceptions from macros |
---|
The macro can be contributed to the MacroBazaar, but I don't think that it will be integrated since it is only helpful as long as the people restricted from viewing pages don't have wiki editing permissions (or admin permissions if the pages are made read-only).
I'm going to keep this ticket open to possibly address the raising of exceptions from within a macro. However, as far as I can see the only reason to do that is for macros that want to block viewing of the entire page, which as I said before is unfortunately not a general solution to adding more granular wiki access control. In any other case I think it's better to have the exceptions caught and displayed as they are now so that it doesn't affect the rest of the page.
comment:3 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Replying to mgood:
… However, as far as I can see the only reason to do that is for macros that want to block viewing of the entire page, which as I said before is unfortunately not a general solution to adding more granular wiki access control.
Right, I don't think that's the appropriate solution. Fine grained permissions is addressed elsewhere (#654, PermissionPolicy, …).
In any other case I think it's better to have the exceptions caught and displayed as they are now so that it doesn't affect the rest of the page.
Agreed.
Simple diff for reraising macro exceptions