At the moment, the admin right implies the script right, even on a space level. Following a discussion with @ludovic yesterday, my proposal is to change this to clearly separate between the concept of (content) admins and users who may write code (i.e., developers). I propose the following changes:
- Space admin right does not imply script right anymore.
- Wiki admin right does not imply script right anymore and wiki admins also cannot grant script right unless they have it.
Only the main wiki owner would have script right by default.Consequently, wiki admins without script right also won’t be allowed to install extensions. We also need to check various places where we check for wiki admin right to also check for script right (like script and style sheet extensions). I propose to add a migration to automatically add script right to any right entry that grants wiki admin right. [edit] This might also not be necessary as by default we grant both script and admin right to the admin group and I’m not proposing to change that. [/edit] - Remove the concept of script right on a space such that script right can only be granted on wiki level.
The rationale for these proposals is as follows:
- Starting with XWiki 14.10, we longer grant script right by default to all users and discourage giving script right to untrusted users. It should be possible to make a user admin of a space to be able to manage its contents without giving the user script right.
- The same logic also applies to wiki admins, you could have admins who should be content admins but not developers. It has just more consequences, this is why I’ve put this separately.
- When a user has script right on any document, the scripts of that document are not limited to that document in any way, they can perform changes on and query the whole wiki (actually all wikis) if the user has sufficient edit/view rights. That’s why imho it doesn’t make sense to have script right only on a part of a wiki. It can still make sense to have this on a sub-wiki level as UIX, JSX etc. are only active on a single wiki and sub-domains can provide a high level of isolation between wikis.
All of these proposals are for XWiki 15.x only, of course.