Changes between Version 7 and Version 8 of UserGuidelines/Admin/Permissions


Ignore:
Timestamp:
07/19/12 11:20:30 (13 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuidelines/Admin/Permissions

    v7 v8  
    7070Record Approval is currently being developed to limit access until approved, in addition to all the other options.
    7171
     72== Creating Roles and ACLs ==
     73Roles and ACLs are normally created during [DeveloperGuidelines/PrePopulate Prepopulate].
     74
     75e.g.
     76* https://github.com/flavour/eden/blob/master/private/templates/IFRC/auth_roles.csv
     77
     78If you need to add ACLs after pre-pop (e.g. on a live production server):
     79* Have an auth_roles.csv with just the title row & the new ACLs which you wish to add, e.g.:
     80{{{
     81"uid","role","controller","function","uacl"
     82"inv_super","Warehouse Super Editor","inv","req_match","READ"
     83}}}
     84* Have a tasks.cfg with just the line to import the roles:
     85{{{
     86*,import_role,auth_roles.csv
     87}}}
     88* Copy both of these  files to a folder on the server (e.g. /tmp)
     89* Open a web2py shell:
     90{{{
     91w2p
     92}}}
     93* Type these commands into that shell:
     94{{{
     95auth.override = True
     96s3db.load_all_models()
     97bi = s3base.S3BulkImporter()
     98s3.import_role = bi.import_role
     99protected = s3mgr.PROTECTED
     100s3mgr.PROTECTED = []
     101request.env.request_method = "GET"
     102path = os.path.join("/","tmp")
     103bi.perform_tasks(path)
     104db.commit()
     105}}}
    72106----
    73107UserGuidelines/Admin