orangain / dokuwiki-copypage-plugin

DokuWiki plugin to create a new page from an existing page.
https://www.dokuwiki.org/plugin:copypage
0 stars 3 forks source link

Tool button should be hidden when user has no privilege to create new page #9

Open orangain opened 6 years ago

orangain commented 6 years ago

See: http://dokuwiki.oreda.net/plugin/list.html#ページ

orangain commented 6 years ago

DokuWiki's access restrictions are bound to pages and namespaces. To determine whether a user can create new page, page id of new page is needed. This means we need to ask new ID rather than hiding the tool button.

If we can retrieve MAXIMUM privilege for all pages, we can hide the tool button for a user who has no privilege to create new page. Unfortunately, there is no public API for plugin to do so.