Do you have some feature in mind that you'd love to see in Couch? Let us know.
4 posts Page 1 of 1
Hi All,
I would like to know if there is any way to get below Access Control feature.

Access Control and workflow plugin to support below use cases.
1. Publisher (Creator of content/update/delete)
2. Reviewer/ Approver
3. publishing control - immediately / schedule for later.


Currently I can only see access control is on page level where you can define who can access the page or not.
Currently Admin/Super admin can modify the content of the pages.
Hi Arjun,

I am sorry but for now the available access control mechanism won't allow you to create the kind of functionality you want.
1. Publisher (Creator of content/update/delete)
2. Reviewer/ Approver
3. publishing control - immediately / schedule for later.


A fair bit of work, but can't it be done via modding default theme?
For example, you have a user named 'test'. And this user is Administrator, but you want this user to only be able 'add/edit/remove' content, without making content public.

Form-view in backend is handled via 'couch/theme/my/content_form.html' snippet (Note, that I already enabled a custom admin theme in config.php and copied snippet from '_system' theme to 'my' theme).

So, in this snippet, we will modify the code saving any cloned page to also make it 'unpublished'. So, whenever user 'test' adds a page, edits it - it will always become 'unpublished'.

Default piece of the snippet is

Code: Select all
            <cms:db_persist_form
                _invalidate_cache='1'
                _token=k_cur_token
            />


And the subtle change is as follows:

Code: Select all
            <cms:if k_user_name eq 'test' && k_template_is_clonable>
            <cms:db_persist_form
                _invalidate_cache='1'
                _token=k_cur_token
                k_publish_date = '0000-00-00 00:00:00'
            />
            <cms:else />
            <cms:db_persist_form
                _invalidate_cache='1'
                _token=k_cur_token
            />
            </cms:if>


Now, you also don't want 'test' user to view Advanced Settings where the publish date is present.

Change will go to this piece:

Code: Select all
        <!-- advance settings dropdown -->
        <cms:render 'group_advanced_settings' />


And it becomes

Code: Select all
        <cms:if k_user_name ne 'test'>
        <!-- advance settings dropdown -->
        <cms:render 'group_advanced_settings' />
        </cms:if>


As a result of these changes, only 'test' can't manage the dates, other Administrators and Super-admin can log in and make pages published.

Reviewer/ Approver

A very similar approach can be used. Each page could have an extra editable checkbox - 'Approved', visible only to certain users.

publishing control - immediately / schedule for later.

If 'Approved' checkbox is checked, then a certain user can have 'Advanced Settings' visible, where date of publish can be set either in present or in future (therefore it is scheduled for later date).
4 posts Page 1 of 1