Edgewall Software

Ticket #2483 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 20 months ago

raising exceptions from macros

Reported by: anonymous Owned by: jonas
Priority: normal Milestone:
Component: wiki system Version: 0.9.2
Severity: normal Keywords: permission, wiki, macro
Cc: m@…

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

trac-reraising-macro-exceptions.diff (0.8 kB) - added by anonymous 3 years ago.
Simple diff for reraising macro exceptions
PagePermission.py (0.7 kB) - added by anonymous 3 years ago.
wiki-macro

Change History

Changed 3 years ago by anonymous

Simple diff for reraising macro exceptions

Changed 3 years ago by anonymous

wiki-macro

  Changed 3 years ago by Markus Tacker <m@…>

  • cc m@… 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   Changed 3 years ago by mgood

  • summary changed from Per-Page permission handling implemented as a wiki-macro to 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.

in reply to: ↑ 2   Changed 20 months ago by cboos

  • status changed from new to closed
  • resolution set to wontfix

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.

Add/Change #2483 (raising exceptions from macros)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.