Issue Details (XML | Word | Printable)

Key: XWIKI-444
Type: Improvement Improvement
Status: Reopened Reopened
Priority: Minor Minor
Assignee: Sergiu Dumitriu
Reporter: Ludovic Dubost
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XWiki Core

Show warning if document requires a programming right and the editor does not have it

Created: 21/Nov/06 18:15   Updated: 03/Apr/09 17:29
Component/s: Templates & User Interface
Affects Version/s: 1.0 B1
Fix Version/s: Future

File Attachments: 1. Text File XWIKI-444-1.patch (2 kB)

Image Attachments:

1. XWIKI-444-withoutPrRights.png
(55 kB)

2. XWIKI-444-withPrRights.png
(59 kB)

Date of First Response: 23/Dec/06 20:23
Development Priority: Low


 Description  « Hide
Get this code from the Netcipia branch

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Ludovic Dubost added a comment - 22/Dec/06 14:37
Moving to unassigned according to new policy

Vincent Massol added a comment - 23/Dec/06 20:23
Ludovic, what happens if the user doesn't have the programming rights and he saves a document which needs it? Is it going to fail with an error?

Thanks
-Vincent


Sergiu Dumitriu added a comment - 10/Jan/07 10:38
No, the document looses the programming rights, which means the code in it will not be executed. This causes a page not to function anymore.

The normal way for preventing this is to protect all pages that need programming right (protect = only admins can edit), since such pages provide important functionality for the wiki (the registration page used to require programming rights in an older version, and that meant that whenever somebody edited the registration form, no users could register anymore).

However, this has to be implemented.


Sergiu Dumitriu added a comment - 12/Jan/07 14:06
It seems to me that this can only be done by searching for functions in the API that require programming rights. This is bad, since the API changes quite often, and there are many functions that will be searched.

Vincent Massol added a comment - 05/Feb/07 12:34
Searching for APIs is both time consuming and doesn't scale. A better solution discussed with Marta and Sergiu is change the architecture/design for checking programming rights. For example, a centralized module could register the different API requiring those rights and calls would go through it and be checked in a generic manner.

Thus, moving this to post 1.0


Jean-Vincent Drean added a comment - 15/Mar/08 15:59
I propose a slightly different way to manage this, patch & screenshots attached

Jean-Vincent Drean added a comment - 17/Mar/08 16:42
Commiting it now, shout if you think it's a bad idea

Jean-Vincent Drean added a comment - 17/Mar/08 18:32
Reopened since a more elegant solution can be implemented in 1.4M1

Vincent Massol added a comment - 25/Apr/08 17:16
JV tells me that you're doing it sergiu so assigning it to you, remove if this is not correct...

Sergiu Dumitriu added a comment - 26/Apr/08 02:21
Yes, I have some ideas, but it's not a top priority for me now. The velocity uberspectors need to be implemented first.

Vincent Massol added a comment - 18/Mar/09 21:05
This doesn't look like a bug.

Guillaume Lerouge added a comment - 03/Apr/09 17:29 - edited
Doesn't seem important enough to be addressed during the course of the 1.9 roadmap. Ludovic, please detail your use case if you really think this issue needs to be addressed in 1.9.

This is hardly a showstopper, it looks like a nice-to-have but not an urgent thing.