If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!

Hi,

 

Recently I installed plugin_wiki as a way to construct our community site for the local hackerspace. After looking for a while I found:

 

https://groups.google.com/forum/?fromgroups=#!topic/web2py/WoAjeY6W3_s

 

Which tells us that people needs to be part of the "editor" group in order to get the functionality of plugin_wiki enabled for them. I can made this manually, but I would like to make this automatically. Serching in the community portal the only thing I found on membership until now is this:

 

http://www.web2pyslices.com/slice/show/1542/manage-users-and-memebership-in-the-same-form

 

but is not quite I'm looking for. As always, pointer to the solution would be appreciated.

Answers (1)

Comments (1)

  • Login to post



  • 0
    rochacbruno 6 years ago
    Put this in the models, just after auth.define_tables()
    
    
    def give_editor_poermission(form):
        group_id = auth.id_group("editor")
        auth.add_membership(group_id,  auth.user.id)
    
    auth.settings.register_onaccept = give_editor_permission
    
    replies (1)
    • offray 6 years ago

      Thanks as alwas Bruno. For the moment manually subscription to the editor group is working fine for our local community and keeps spammers away. Maybe what I need is to give permissions to some other users to let them add editors also. I really like to see the wiki functionality added to core web2py as the first end user oriented app included in web2py. In that way communities powered by web2py can start to build their online presence as the learn more web2py. So the next step would be migration from plugin_wiki to build in wiki and adding a file based backend (git, fossil, etc for a distributed wiki)

Related content


Hosting graciously provided by:
Python Anywhere