-shameless bump- So "Copy Page" is the prefered way? -- View this message in context: http://xwiki.475771.n2.nabble.com/Change-Page-Owner-tp7219422p7226177.html Sent from the XWiki- Users mailing list archive at Nabble.com.
You could write a script that: 1. selects all documents created by a given user (first input parameter) 2. for each document, sets the creator to a different user (second input parameter) using API that requires programming rights. Of course, the page that hosts this script (either Velocity or Groovy) needs to be saved by an user that has programming rights, and you also need to hide this page from simple users. Here's a short Velocity snippet that changes document creator: ----------8<---------- #set($publicDocument = $xwiki.getDocument('SomeSpace.SomePage')) #set($protectedDocument = $publicDocument.getDocument()) #set($discard = $protectedDocument.setCreator("XWiki.NewCreator")) #set($discard = $publicDocument.save("Changed document creator.")) ---------->8---------- Hope this helps, Marius On Thu, Jan 26, 2012 at 8:54 AM, Hamster <teunham@hotmail.com> wrote:
-shameless bump-
So "Copy Page" is the prefered way?
-- View this message in context: http://xwiki.475771.n2.nabble.com/Change-Page-Owner-tp7219422p7226177.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Hi Hamster, See http://extensions.xwiki.org/xwiki/bin/view/Extension/Change+Document+Creator Thanks -Vincent On Jan 26, 2012, at 7:54 AM, Hamster wrote:
-shameless bump-
So "Copy Page" is the prefered way?
On Jan 26, 2012, at 8:52 AM, Marius Dumitru Florea wrote:
You could write a script that:
1. selects all documents created by a given user (first input parameter) 2. for each document, sets the creator to a different user (second input parameter) using API that requires programming rights.
Of course, the page that hosts this script (either Velocity or Groovy) needs to be saved by an user that has programming rights, and you also need to hide this page from simple users.
Here's a short Velocity snippet that changes document creator:
----------8<---------- #set($publicDocument = $xwiki.getDocument('SomeSpace.SomePage')) #set($protectedDocument = $publicDocument.getDocument()) #set($discard = $protectedDocument.setCreator("XWiki.NewCreator"))
hehe… my script is better since you're using a deprecated API here ;) -Vincent PS:
#set($discard = $publicDocument.save("Changed document creator.")) ---------->8----------
Hope this helps, Marius
On Thu, Jan 26, 2012 at 8:54 AM, Hamster <teunham@hotmail.com> wrote:
-shameless bump-
So "Copy Page" is the prefered way?
-- View this message in context: http://xwiki.475771.n2.nabble.com/Change-Page-Owner-tp7219422p7226177.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Thanks guys! Much appreciated! -- View this message in context: http://xwiki.475771.n2.nabble.com/Change-Page-Owner-tp7219422p7226385.html Sent from the XWiki- Users mailing list archive at Nabble.com.
Just wondering...3 1/2 years ago it was not possible to change the owner of a page in the UI. Is this now possible (with XWiki 7.x) within the UI or do I still need to use the script? -- View this message in context: http://xwiki.475771.n2.nabble.com/Change-Page-Owner-tp7219422p7595697.html Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Hamster, On 22 Aug 2015 at 09:17:37, Hamster (teunham@hotmail.com(mailto:teunham@hotmail.com)) wrote:
Just wondering...3 1/2 years ago it was not possible to change the owner of a page in the UI.
Is this now possible (with XWiki 7.x) within the UI or do I still need to use the script?
It’s still not possible to do it with the UI (you have to use a script). The reason it hasn’t changed is that nobody has asked for it :) If you think such a UI feature is needed please create a jira issue for it, with some description as to where you’d see it located in the UI and how it would work. Thanks -Vincent [snip]
I'd certainly give that a +1. Seems like pretty necessary functionality. Also, to be able to transfer ownership of all items belonging to a user (useful when someone leaves your organisation and you need to transfer their "stuff" to someone else). Tim On 23/08/2015 13:39, vincent@massol.net wrote:
Hi Hamster,
On 22 Aug 2015 at 09:17:37, Hamster (teunham@hotmail.com(mailto:teunham@hotmail.com)) wrote:
Just wondering...3 1/2 years ago it was not possible to change the owner of a page in the UI.
Is this now possible (with XWiki 7.x) within the UI or do I still need to use the script?
It’s still not possible to do it with the UI (you have to use a script). The reason it hasn’t changed is that nobody has asked for it :)
If you think such a UI feature is needed please create a jira issue for it, with some description as to where you’d see it located in the UI and how it would work.
Thanks -Vincent
[snip] _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Hi Tim, On 23 Aug 2015 at 22:53:56, Tim Dudgeon (tdudgeon@informaticsmatters.com(mailto:tdudgeon@informaticsmatters.com)) wrote:
I'd certainly give that a +1. Seems like pretty necessary functionality. Also, to be able to transfer ownership of all items belonging to a user (useful when someone leaves your organisation and you need to transfer their "stuff" to someone else).
Note that you can remove a user without having to transfer any ownership and you don’t need to be the creator of a page to be allowed to modify it or have permissions on it. Also, even if someone leaves a company they’re still the creator of the pages they created (in reality, this can never be removed, they’ll always be the creator of that page, even if you try to hide it ;)). Personally I don’t see this feature as a necessary one. I’m curious: why do you think it’s necessary? :) Thanks -Vincent
Tim
On 23/08/2015 13:39, vincent@massol.net wrote:
Hi Hamster,
On 22 Aug 2015 at 09:17:37, Hamster (teunham@hotmail.com(mailto:teunham@hotmail.com)) wrote:
Just wondering...3 1/2 years ago it was not possible to change the owner of a page in the UI.
Is this now possible (with XWiki 7.x) within the UI or do I still need to use the script?
It’s still not possible to do it with the UI (you have to use a script). The reason it hasn’t changed is that nobody has asked for it :)
If you think such a UI feature is needed please create a jira issue for it, with some description as to where you’d see it located in the UI and how it would work.
Thanks -Vincent
[snip]
Well, I suppose the scenario is like this. Your company has 2 users, Jon and Sam. Jon has just left the company and Sam is picking up all his work. There needs to be a simple way to transfer Jon's "rights" to all documents and apps to Sam. Its probably correct to leave Jon as a user, but just inactivate the account (e.g. the fact the Jon created and edited some docs is important information and should not be lost). But there needs to be a simple way to enable Sam to do anything that Jon used to be able to do on all of those docs. e.g. not have to make a manual change on every document. Maybe there's already a way to do this. Tim On 23/08/2015 18:40, vincent@massol.net wrote:
Hi Tim,
On 23 Aug 2015 at 22:53:56, Tim Dudgeon (tdudgeon@informaticsmatters.com(mailto:tdudgeon@informaticsmatters.com)) wrote:
I'd certainly give that a +1. Seems like pretty necessary functionality. Also, to be able to transfer ownership of all items belonging to a user (useful when someone leaves your organisation and you need to transfer their "stuff" to someone else).
Note that you can remove a user without having to transfer any ownership and you don’t need to be the creator of a page to be allowed to modify it or have permissions on it.
Also, even if someone leaves a company they’re still the creator of the pages they created (in reality, this can never be removed, they’ll always be the creator of that page, even if you try to hide it ;)).
Personally I don’t see this feature as a necessary one. I’m curious: why do you think it’s necessary? :)
Thanks -Vincent
Tim
On 23/08/2015 13:39, vincent@massol.net wrote:
Hi Hamster,
On 22 Aug 2015 at 09:17:37, Hamster (teunham@hotmail.com(mailto:teunham@hotmail.com)) wrote:
Just wondering...3 1/2 years ago it was not possible to change the owner of a page in the UI.
Is this now possible (with XWiki 7.x) within the UI or do I still need to use the script?
It’s still not possible to do it with the UI (you have to use a script). The reason it hasn’t changed is that nobody has asked for it :)
If you think such a UI feature is needed please create a jira issue for it, with some description as to where you’d see it located in the UI and how it would work.
Thanks -Vincent
[snip]
users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
On 24 Aug 2015 at 00:53:15, Tim Dudgeon (tdudgeon@informaticsmatters.com(mailto:tdudgeon@informaticsmatters.com)) wrote:
Well, I suppose the scenario is like this. Your company has 2 users, Jon and Sam. Jon has just left the company and Sam is picking up all his work. There needs to be a simple way to transfer Jon's "rights" to all documents and apps to Sam. Its probably correct to leave Jon as a user, but just inactivate the account (e.g. the fact the Jon created and edited some docs is important information and should not be lost). But there needs to be a simple way to enable Sam to do anything that Jon used to be able to do on all of those docs. e.g. not have to make a manual change on every document. Maybe there's already a way to do this.
Maybe the issue comes from the fact that we don’t have any notion of owner for a doc (which seems ok for a wiki); we just have the notion of Creator (ie the first person who initiated the doc). The issue is that the creator of a doc has some special permissions for that doc and that cannot be transferred. However extra permissions can be given to Sam. Thus, the solution I can think of is to have an Admin review the permissions Jon had on the wiki and verify that Sam has the same permissions and if some are missing, review them and if ok give them to Sam or move the documents to other locations where Sam would get the permissions. Copying permissions from one user to another is a feature that could even be implemented if XWiki users find that interesting, possibly with a UI showing the new permissions that would be given to Sam before the copy happens (to make the review possible). @Hamster: what is your use case? Would that solve it? Thanks -Vincent
Tim
On 23/08/2015 18:40, vincent@massol.net wrote:
Hi Tim,
On 23 Aug 2015 at 22:53:56, Tim Dudgeon (tdudgeon@informaticsmatters.com(mailto:tdudgeon@informaticsmatters.com)) wrote:
I'd certainly give that a +1. Seems like pretty necessary functionality. Also, to be able to transfer ownership of all items belonging to a user (useful when someone leaves your organisation and you need to transfer their "stuff" to someone else).
Note that you can remove a user without having to transfer any ownership and you don’t need to be the creator of a page to be allowed to modify it or have permissions on it.
Also, even if someone leaves a company they’re still the creator of the pages they created (in reality, this can never be removed, they’ll always be the creator of that page, even if you try to hide it ;)).
Personally I don’t see this feature as a necessary one. I’m curious: why do you think it’s necessary? :)
Thanks -Vincent
Tim
On 23/08/2015 13:39, vincent@massol.net wrote:
Hi Hamster,
On 22 Aug 2015 at 09:17:37, Hamster (teunham@hotmail.com(mailto:teunham@hotmail.com)) wrote:
Just wondering...3 1/2 years ago it was not possible to change the owner of a page in the UI.
Is this now possible (with XWiki 7.x) within the UI or do I still need to use the script?
It’s still not possible to do it with the UI (you have to use a script). The reason it hasn’t changed is that nobody has asked for it :)
If you think such a UI feature is needed please create a jira issue for it, with some description as to where you’d see it located in the UI and how it would work.
Thanks -Vincent
[snip]
Our use case: We use a script that displays the childpages of a page (the user can also choose how many columns that list should have). These pages are display in alphabetic-order based on the PageName (not display name). In order to change the order of that list, one must rename the page...which only the owner of that page can do (or an admin, but I don't like giving admin rights to other people :-) Giving a user the right to rename a page would indeed solve my problem :-) -- View this message in context: http://xwiki.475771.n2.nabble.com/Change-Page-Owner-tp7219422p7595737.html Sent from the XWiki- Users mailing list archive at Nabble.com.
You don`t need admin rights to rename a page, just the 'delete' right on the page to rename and edit rights in the space you are about to rename/move the page to. It`s like this because currently rename performs 2 operations in the background: copy (old document to new location/name) + delete (the old document). Thanks, Eduard On Tue, Aug 25, 2015 at 8:50 AM, Hamster <teunham@hotmail.com> wrote:
Our use case:
We use a script that displays the childpages of a page (the user can also choose how many columns that list should have). These pages are display in alphabetic-order based on the PageName (not display name).
In order to change the order of that list, one must rename the page...which only the owner of that page can do (or an admin, but I don't like giving admin rights to other people :-)
Giving a user the right to rename a page would indeed solve my problem :-)
-- View this message in context: http://xwiki.475771.n2.nabble.com/Change-Page-Owner-tp7219422p7595737.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
On Thu, Aug 27, 2015 at 1:52 PM, Eduard Moraru <enygma2002@gmail.com> wrote:
You don`t need admin rights to rename a page, just the 'delete' right on the page to rename and edit rights in the space you are about to rename/move the page to.
It`s like this because currently rename performs 2 operations in the background: copy (old document to new location/name) + delete (the old document).
Nothing to do with the actions used behind the scene IMO, whatever the way to implement it you will end up with a document added somewhere (so you need the right to do that) and a document that used to be in some place not there anymore (so you also need the right to do that).
Thanks, Eduard
On Tue, Aug 25, 2015 at 8:50 AM, Hamster <teunham@hotmail.com> wrote:
Our use case:
We use a script that displays the childpages of a page (the user can also choose how many columns that list should have). These pages are display in alphabetic-order based on the PageName (not display name).
In order to change the order of that list, one must rename the page...which only the owner of that page can do (or an admin, but I don't like giving admin rights to other people :-)
Giving a user the right to rename a page would indeed solve my problem :-)
-- View this message in context: http://xwiki.475771.n2.nabble.com/Change-Page-Owner-tp7219422p7595737.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
participants (7)
-
Eduard Moraru -
Hamster -
Marius Dumitru Florea -
Thomas Mortagne -
Tim Dudgeon -
Vincent Massol -
vincent@massol.net