Permissions for specific Contenttypes

A forum for Bolt related questions / issues

Permissions for specific Contenttypes

Postby gawain » Sun Jan 12, 2014 12:41 pm

I stuck on trying to set permissions for a particular Contenttype. I want people with the 'editor' role to only be able to edit 'Sheep' records (hat-tip to Bob), but nothing I try in permissions.yaml seems to work, excerpt below.

Can anyone straighten me out on this? I'll happily write up an example to be included in the documentation in return!

Code: Select all
contenttype-all:
    edit: [ developer, admin, chief-editor ]
    create: [ developer, admin, chief-editor ]
    publish: [ developer, admin, chief-editor ]
    depublish: [ developer, admin, chief-editor ]
    delete: [ developer, admin ]
    change-ownership: [ developer, admin ]

contenttype-default:
    edit: [ admin ]
    create: [ admin ]
    change-ownership: [ owner ]
    view: [ anonymous ]

contenttypes:
    sheep:
        edit: [ editor ]
        create: [ editor ]
gawain
 
Posts: 6
Joined: Fri Jan 10, 2014 10:06 am

Re: Permissions for specific Contenttypes

Postby Bob » Sat Jan 18, 2014 10:28 am

I think that ought to work.. I'll look into it. And if it doesn't, it's a bug! :-)
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Permissions for specific Contenttypes

Postby Bob » Sun Jan 19, 2014 12:42 pm

Dis some testing, and for me this works as expected.. If i assign the role 'editor' to a user, as their only role, they're able to create and edit 'sheep' records.. Am I overlooking something?
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Permissions for specific Contenttypes

Postby gawain » Tue Jan 21, 2014 12:28 pm

You are correct. It was a typo on the Contenttype name on my end. An pull request should be in your email for an example in permissions.yml.dist
gawain
 
Posts: 6
Joined: Fri Jan 10, 2014 10:06 am

Re: Permissions for specific Contenttypes

Postby Bob » Wed Jan 22, 2014 3:50 pm

Glad it works now! (I merged your pullrequest a minute ago! ;-) )
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm


Return to Bolt Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron