Modify

Opened 15 years ago

Closed 11 years ago

#5492 closed defect (worksforme)

Text visible in editing

Reported by: anonymous Owned by: Jonathan Turkanis
Priority: normal Component: AccessMacro
Severity: normal Keywords:
Cc: Dmitri Trac Release: 0.12

Description

In your example..

{{{
#!access
#allow(TICKET_ADMIN)

some text for ticket admins
}}}

user, having WIKI_EDIT cat press "Edit this page" for reading and modifying protected text, so this construction make sence only if #allow(WIKI_EDIT) specified.

Attachments (0)

Change History (7)

comment:1 Changed 15 years ago by Jonathan Turkanis

Status: newassigned

You're right that it doesn't make much sense to try to hide parts of a wiki page from people who have permission to edit the page, so this macro will be useful when there are users without WIKI_EDIT permissions.

I don't understand your comment about the example you quoted. It seems to make sense for there to be parts of wiki pages only ticket admins can see.

comment:2 Changed 14 years ago by Ryan J Ollos

Just starting to test this out, and so made a note about what you mention here on the wiki page.

comment:3 Changed 14 years ago by tekknokrat

It would be great if only the part that is shown to the user is editable. When comparing to mediawiki there it is possible to edit explicit chapters of the page. With introducing such a feature to your plugin you would therefore kill two birds with a stone. Perhaps you can also combine access logic with headings syntax e.g. something like:

{{{
#!access
#allow(TICKET_ADMIN)
=== heading3 ===
}}}

comment:4 Changed 14 years ago by Dmitri

Cc: Dmitri added; anonymous removed

I found a worst case recently :(

In my wiki anonymous users have no WIKI_EDIT. But there is a link "Download in other formats: Plain Text", which makes content visible for everyone.

I'm searching for plugin, which makes a sort of "public pages", accessible by WIKI_VIEW and rest - by some special permission, with ability to select public pages on Administration page and without extra mainnav locations.

comment:5 Changed 14 years ago by anonymous

Yeah, that looks like a problem. I haven't had time to figure out if it's possible to fix the other reported bug (relating to history) without a patch.

Thanks for the info.

comment:6 in reply to:  3 Changed 11 years ago by Ryan J Ollos

Replying to tekknokrat:

It would be great if only the part that is shown to the user is editable. When comparing to mediawiki there it is possible to edit explicit chapters of the page. With introducing such a feature to your plugin you would therefore kill two birds with a stone.

SectionEditPlugin implements that feature, but in a very messy way. Section editing really needs to be implemented in the Trac core. There is a proposal (t:TracDev/Proposals/AdvancedWikiOperations) and ticket (t:#1024) for this feature.

comment:7 in reply to:  4 Changed 11 years ago by Ryan J Ollos

Resolution: worksforme
Status: assignedclosed

Replying to g1itch:

I found a worst case recently :(

In my wiki anonymous users have no WIKI_EDIT. But there is a link "Download in other formats: Plain Text", which makes content visible for everyone.

This is also described in #5554, therefore I'm going to close this ticket. The limitations of the plugin have been captured on the project wiki page.

I'm searching for plugin, which makes a sort of "public pages", accessible by WIKI_VIEW and rest - by some special permission, with ability to select public pages on Administration page and without extra mainnav locations.

If you want to restrict access to certain pages, you can use t:TracFineGrainedPermissions. For an editor, you can use the FineGrainedPageAuthzEditorPlugin, which will be integrated into the AccountManagerPlugin eventually.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonathan Turkanis.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.