HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Page Edit Permission

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#92961 (In Topic #18619)

Non-joined user

Allow a certain usergroup to edit a zone

We have upgraded to the new version 9. My question is can we allow certain user group to have permissiont to edit a zone? We have set up a half dozen zones for each of our subs and would like the user in charge of that zone to have access to edit the page as needed, I have set up speical usergroups within ocportal and assigned that user to the group, but can not find any options for allow user to edit. Any help?
Back to the top
 
Posted
Rating:
#92962
Avatar

Hi,

That's not currently a feature I'm afraid. Tracker issue is:
0000107: Comcode page editing permissions, per zone - ocPortal feature tracker


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#92963

Non-joined user

Can the page or zone (php files) in the zone folder be edited to allow this.
Back to the top
 
Posted
Rating:
#92965
Avatar

Yes, but it'd require an experienced programmer to work out the code to do that.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#92967

Non-joined user

is there anything I can add to the page, that make it "zone" specific and show on the =start page for that zone and limit that to a single usergroup.
Back to the top
 
Posted
Rating:
#92968
Avatar

I'm afraid I'm lost. You seem to have moved from talking about edit permissions, to talking about filtering navigation options by usergroup?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#92969

Non-joined user

I am petty good with .php if you can tell me the files are affected, then I can send it back to you with the modifictionats and can add to the "addons", only because this may not be good for everyone, but I see the need for this, really surpised it does not do this already, it does everything elese. I would assume that their would need to be some db changes, and should add a new module to handle this, such as zone_page_permission editor, but I may be able to incorporate into the "permission tree", or we can do a db lookup and grab the zone_page_permission, something like a "flag" option for a page.  
Back to the top
 
Posted
Rating:
#92970

Non-joined user

No, I just need to allow certain users to post things to a page, I thought that editing the page would be a good way for then to control their own zone, so they could add text, weather, tickers, and links if they wanted.
Back to the top
 
Posted
Rating:
#92972
Avatar

Basically cms_comcode_pages.php manages the edits, but it'd take me a few hours to work out exactly how other files might need to be edited. The problem is that other content types can have privileges set on the module (E.g. galleries) and the categories underneath. Comcode pages are under multiple possible zones, not a module, and there's currently no mechanism for inheriting privileges from a zone. The tracker issue discusses making a fake module in each zone to deal with it, so the permission tree code would need to report those fake modules, authorisation code (used at least in cms_comcode_pages.php, and sources/site.php, but possibly other files) would need to check against the relevant fake module to the zone the page was in. It's all very complex, it'd take even me at least a day to sort it out.

It could be hacked together quicker, by hard-coding something into cms_comcode_pages.php to avoid the need to tie into the permissions framework, but that wouldn't be worth distributing as an addon as it would be too complex/specific to use, unless I suppose thorough instructions were written.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#92975

Non-joined user

I agree Chris, a quick fix is not worth much. But, want about creating a zone_permission.php when a zone are created and allow that to be edited within the portal.
Back to the top
 
Posted
Rating:
#92976

Non-joined user

Can cms_comcode_pages.php be added to the /pages/module in the zones and modified in there, I am looking at the file now, if I knew what lines to hardcode.
Back to the top
 
Posted
Rating:
#92977
Avatar

Just like an empty file that the permission tree editor will find, and then hang permission checks off it in cms_comcode_pages.php? That'd work – a super-hack, but if it gets the job done for you :).

Say you made newzone/pages/modules/_newzone_permission.php, and it contained:

Code

<?php

class Module__newzone_permission
{
   function get_privilege_overrides()
   {
      return array('edit_highrange_content'=>0,'edit_own_highrange_content'=>0,'delete_highrange_content'=>0,'delete_own_highrange_content'=>0,'add_highrange_content'=>0,'bypass_validation_highrange_content'=>0);
   }
}

and then you adjust this line in sources/site.php:

Code

   if ((has_actual_page_access(get_member(),'cms_comcode_pages',NULL,NULL,(($comcode_page_row['p_submitter']==get_member()) && (!is_guest()))?'edit_own_highrange_content':'edit_highrange_content')))
to probably:

Code

   if ((has_actual_page_access(get_member(),'_'.$zone.'_permission',$zone,NULL,(($comcode_page_row['p_submitter']==get_member()) && (!is_guest()))?'edit_own_highrange_content':'edit_highrange_content')))
(that line controls placement of the edit link)
and in other places in the code, esp. in cms_comcode_pages.php which is where the real permission will be enforced prior to the action happening.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#92978
Avatar

So in essence this takes the ability to override high-level cms privileges from the cms_comcode_pages module, and puts it on these hack modules in individual zones, then moves the page editing permission check to look at these hack modules instead (checking against the one in the zone for the page which is being considered for edit).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#92979

Non-joined user

building off what the "guest" has asked, if cms-comcode-page.php can be placed or created in everyzone, can we add a line to the global language file or create a lauguage file to handle those files and then edit that line.
Back to the top
 
Posted
Rating:
#92980
Avatar

What I proposed above, which is what I presumed you meant, and which i have not tested, would allow privileges to be set using the permission tree editor. You'd just set them on the hack page we have made, as the code changes force checking against an override placed onto that page.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#92982

Non-joined user

Chris,
A little confused, do I allow veiw access to the usergroup a want to edit this zone (page) in the permission tree editor, or do I need to add something to the new file (_new_zone_permission.php), if it is will the permission tree editor, then this hack does not appear to work, I called the usergroup Zone_Sub1, then went into the permission tree editor and gave then view access (the only option) and saved it, went back to the page logged in as a test user in the group and no luck.
Back to the top
 
Posted
Rating:
#92987
Avatar

Permission tree editor should show those privileges under the node, not only view access. If that doesn't work, not sure why, but I don't have the time to debug through it myself I'm afraid.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#92994

Non-joined user

Thanks for you help, too bad this is not working. For now we will leave the ocportal site open to everyone and use the CM for the users to be able to edit content page and link then to the portal. OcPortal is a really great product, you and your team hav e done a great job. I will check back in the future to see if this functions has been added.
Back to the top
 
Posted
Rating:
#92995

Non-joined user

I was just check back on this after last night. The code Chris gave appears to be correct, but I just ran in our our test portal, and to no luck. I did mange to catch an error, but not sure if this has anything to do with it.

"PHP ERROR [1] Call to undefined method Module__newzone_permission::run() in sources\zones.php on line 425 (version: 9.0.2, PHP version: 5.3.14, URL: /Site32/index.php?page=_newzone_permission)"

Not, sure I will keep digging around, this is a nice feature to have (if really needed)
Back to the top
 
Posted
Rating:
#93008

Non-joined user

Guest, this has been bothering me since the issue came up, I have been able to change ocportal to almost everything I wanted with the help of Chris and his team and a strong php backround. I have been working with ocportal for years and strongly recommend it to my clients, and to get paid support from the ocportal team.

I think one of the issue is for some reason ocportal is not see the newzone_permission.php as a module, and those is not sure how to treat it in the permission_tree. If you look at the other module they all show up in the module_manager, except this one. I think there need to be a little more code put into the newzone_permission.php file to force the ocportal to see it as a valid module.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Expand