Allow ONLY text editing

Permalink 1 user found helpful
Hello,

I've been trying unsuccessfully to figure this one out. I have made a group named Editors. I want Editors to be able to edit the text in existing blocks, but I don't want them to do anything else. I don't want them to be able to create new blocks, move existing blocks or delete blocks, ONLY edit text.

Can anyone give me any guidance or suggestions on this?

Thanks,

Steve

 
Mainio replied on at Permalink Best Answer Reply
Mainio
Hi,

You might want to take a look at the advanced permissions:
http://www.concrete5.org/documentation/general-topics/simple-permis...

The allow e.g. block-level permissions, area-level permissions and also give a lot more permission options to choose from.

You can enable them by putting this into your config/site.php:
define('PERMISSIONS_MODEL', 'advanced');



Antti / Mainio
jr5adm1n replied on at Permalink Reply
I have applied advanced controls by editing config/site.php. I have given the Editors group page permissions of Read,Write and Version. There is one user, editoruser, in that group. When I log in as that user, go into edit mode and click a block, it still has the Copy to Scrapbook, Move, Delete, Design and Custom Template options. I don't want that user to have any option but Edit. I must be doing something wrong, but I'm not seeing it. Thanks for any advice.

Steve
TheRealSean replied on at Permalink Reply
TheRealSean
There is a block which will allow this to happen its a editor that allows editing in place.

What you are requesting may need some edits to the core you can remove the delete option,

But Edit, Move, Custom Templates will always remain.(I think, at least not without editing the code)

You could override the templates but I don't think that's what you are after
jr5adm1n replied on at Permalink Reply
I've edited code so if a non-admin user is logged in, when they right-click on a block, Edit is the only available option. Now I need to edit code so a non-admin logged in user gets the Add Page link when on the Blog page, because my non-admin user needs to be able to add blog posts without admin assistance. If anyone knows a better way to do this than what I've described, please let me know.
crossbones replied on at Permalink Reply
Hey jr5adm1n,
Would you be willing to share that code? I'm trying to add text edit only functionality for non-admin and I would really appreciate that code as well as an explanation of where to put it. Thanks in advance for your help!
jr5adm1n replied on at Permalink Reply
Crossbones, I'm having a terrible time finding the file I edited. I thought I had it documented, but can't find the document, go figure. I'll keep looking and post here when I find it.
dalberts69 replied on at Permalink Reply
Howdy,

So on the latest version (5.5.1), what I've done, and it's a little hackish, but on the header.php of my template I've added:

<?php
$u = new User();
$userclasses = '';
$groups = $u->getUserGroups();
foreach ($groups as $key => $value) {
   $userclasses .= strtolower(str_replace(' ', '-', $value)).' ';
}
?>
<body class='<?php print $userclasses; ?>'>


Then I used some CSS to hide the Bootstrap popover anchors for Design/Custom Template, showing them only for administrators

<style>
    .ccm-icon-design-menu, .ccm-icon-custom-template-menu{display:none !important;}
    .administrators .ccm-icon-design-menu, .administrators .ccm-icon-custom-template-menu{display:block !important;}
</style>


Essentially using this, you could hide pretty much anything that appears in those popovers, based on usergroup. Just a bunch of css overrides and whatnot. Like I said - hackish and such but it works for me quite well and the client really couldn't care less, for now until that sort of thing is part of the permissions, and I guess until they change the css classnames of those elements.