We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Per entry based adding/editing permissions

Development and Programming

Brian Litzinger's avatar
Brian Litzinger
693 posts
16 years ago
Brian Litzinger's avatar Brian Litzinger

I tried out the new Structure module, and it’s great, but has some limitations. Since it puts all ‘static’ pages into one weblog, you can’t assign certain groups to be able to edit entries within that weblog like you can if you break up content types into different weblogs (the traditional way).

I’m starting to write my first extension which will hopefully allow you to assign what user groups can or can’t edit an existing entry, or possibly add a child entry to an existing entry. I can’t think of a way to restrict adding entries though, just editing existing ones.

My biggest question is… has anyone written this already? :D I don’t want to spend time doing this only to realize it already exists.

       
Brian Litzinger's avatar
Brian Litzinger
693 posts
16 years ago
Brian Litzinger's avatar Brian Litzinger

So I’m making good progress with this. I’m essentially highly modifying Mark Huot’s Checkbox extension. I’m to the point where I’m trying to hide the Publish form and show a message to the effect of ‘you don’t have permission to edit this entry’ if the user can’t edit it, so I’m using the ‘publish_form_start’ hook and calling this method:

function check_permissions( $which, $submission_error, $entry_id )
    {
         print_r(func_get_args());
    }

And the only thing that prints is ‘edit’, so the $which param is the only one that isn’t NULL, I’m not getting the entry_id, which is kind of crucial 😊

       
Brian Litzinger's avatar
Brian Litzinger
693 posts
16 years ago
Brian Litzinger's avatar Brian Litzinger

I can’t find the hook, or I’m not printing the correct HTML, to completely hide the publish form tabs, and all the form fields. I need to hide everything below the breadcrumbs and display a message to the user.

How do I do this?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.