Oh, and remember to re-add the user to XWiki.XWikiAdminGroup, in case it was removed by the delete operation. On Tue, Aug 16, 2016 at 3:26 PM, Eduard Moraru <[email protected]> wrote:
Hi, Tom,
Depends how you`ve deleted the Admin user.
If you`ve just sent it to the recycle bin, then going on the http:// <server>/xwiki/bin/view/XWiki/Admin page should show you the option to restore the profile page from recycle bin.
If no such option exists (and you`ve deleted it from the recycle bin as well), the you have to recreate it. Just go to the same page, press the + (create page) button, make sure "Terminal page" is checked and hit "create", then "save". After that, go into object edit mode on the same page and add an object of the class XWiki.XWikiUser. Hit "Save" and the go into view mode where it should start looking like a user profile page again. The next thing would be to reset its password so that you can then log in with it at some point.
Another option (instead of recreating it) would be to completely restore it by manually re-import just the XWiki.Admin page from the UI XAR, but I would need to know what exact XWiki version you have so I can give you the right link.
Thanks, Eduard
On Tue, Aug 16, 2016 at 12:31 PM, Tom Neumann <[email protected]> wrote:
Hi Eduard,
thanks for your help! How can I recreate the user if the macros don't work at that point? It does not seem to work out.
Thanks, Tom
From: [email protected] Date: Tue, 16 Aug 2016 12:25:05 +0300 To: [email protected] Subject: Re: [xwiki-users] failed to execute velocity macros
Hi,
Deleting the XWiki.Admin user is not a good idea. It is generally used as the last author and content editor of pretty much all the default XWiki documents, most of them containing scripts. A script can only execute if its last content author has the SCRIPT right. If that author is deleted, then the script also loses its right to execute. So it does not matter what user you use to *see* the script, but what user you used to *save* the script (thus granting it the rights of this last user/author).
My suggestion is that you undelete/recreate the XWiki.Admin user (easiest option) and then disable it (i.e. mark it as inactive to not allow it to log in), if you don`t want to use it. This way the old scripts inside wiki pages will resume functioning.
Note that this is not only about the Admin user, so you need to be aware that once you delete a user, you "revoke" the right of execution for any scripts he might have authored. This is generally a good thing, but it can also bite you, as you`ve seen.
This extension might also be useful (but recommended only for users other than XWiki.Admin): http://extensions.xwiki.org/xwiki/bin/view/Extension/Change+ Content+Author
Hope this helps, Eduard
On Tue, Aug 16, 2016 at 11:38 AM, Tom Neumann <[email protected]> wrote:
Hi all,
I've got a problem with my xwiki build right now. I configured LDAP and gave my LDAP user all the rights on the wiki, but I forgot to make him the owner of the wiki. After that I logged in with the LDAP user and deleted the old admin account and tried to set my LDAP user as owner of the wiki.
Now every page shows this message: Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.
Even the superuser account can't see the pages normally. What can I do? Is there a setting to give velocity macro rights to everybody? Or can I edit the database somehow?...
Thanks, Tom
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users