startouf I have a ruby-on-rails application that manages projects. From this application, I'd like to be able to create new pages on Dokuwiki, and apply some access control restriction to each of these. For example, from my web application : * I want to create a page "Project #1023" on my dokuwiki under the project section/namespace * I want to give write permissions to John Smith and Barbara Smith on this page. * Later, I realise I don't want Barbara to have access anymore, and give access to William Smith I am using LDAP to manage authorisations and access control. I *could* create subgroups in the LDAP, one for each project, and assign uid users to this group, and give the group permissions to write, but I'd find it easier to just explicitely tell dokuwiki which person has access to it. I see two ways of doing this : * My rails application directly writes files inside the dokuwiki directory, and I run the script indexer.php when I'm done (if I understand the doc, this script's supposed to clean the mess and rebuild the index after *brute-ish* changes to the files). From what I understand, the ACL settings are on a separate file, and it's not recommended (why ?) to change them somewhere else than from the GUI * Message based communication. That seems to be what action plugins are made for. In production environment, both dokuwiki and my rails app will be on the same server, but for dev/test purposes it could be nice if that could also be done remotely (or if there's already some dev/test dokuwiki plugins). Is it possible to have a secure communication API between dokuwiki and a web app ? Is it possible to code a dokuwiki plugin that could perform the actions mentionned at the beginning of my post ? What are your thoughts on this ? Ever had to do something similar ? Any advice before I (or we) start diving in the code and the documentation ?
startouf Thanks this is exactly what I need, and there's even some sample ruby code ^^ And sorry I just realised I could have found it by typing 'API' in the website searchbar.
startouf With the current API, is it possible to retrieve the current AccessControl List for a given page ? I need to only give right access to a small group of people, different for each page. I can call "plugin.acl.addAcl" to add new ACLs, but how do I know which other users already have permissions that I should remove/change ? Potentially, many applications across different servers are going to use the API, and before I make changes to a page ACLs, I must be able to know what are the permissions already in place.
andi Well https://www.dokuwiki.org/devel:xmlrpc#wikiaclcheck might help a bit. But there's no call to get a list of all the rules currently. It should be relatively easy to add to the ACL plugin. A PR would be welcome.