Jump to content

Trying to get "pages" menu item to show up for editor and publisher roles.


Recommended Posts

Posted

I'm trying to get a module to show up in the "pages" menu for editors, publishers, and other roles that are not part of the super user group. 

The page lives under:
/Admin/pages/drafts

The templates is:

And admin template, and it has a field for "process" which is required for the module to work. 

All the solutions I have come up with to show this page are clunky, or plain wrong, so I figure there must be a simple way, maybe some one else has come across.  

post-1913-0-52811800-1428166515_thumb.pn

post-1913-0-07213700-1428166567_thumb.pn

Posted

Set permission in getModuleInfo()

"permission" => "drafts",

Create a permission called drafts and assign it to the roles you want to have access.

On mobile, sorry for the terse reply.

Posted

drafts is a custom process module.

I did try that permission approach. if a user has access to that process that page still does not show up in the "pages" menu for the editor.  

        return array(
            'title'    => 'Project Drafts',
            'version'  => '0.2.0',
            'summary'  => 'Coordinate page drafts and new content content launched that are tied to code pushes',
            'permission' => 'draft-groups',
            'singular' => true,
            'autoload' => true
        );

If I don't give the editor role, permissions access to "draft-groups" they can not access the page at all, which works how I imagine it would (indicating that the permission system is working)

hmm I wonder what i'm missing?

Posted

It may actually be related to AdminThemeReno and the way the Pages menu item is built. Have you tried it in the default theme?

I'll look closer when I can get to a computer later,

Posted

Ha! that did it!!! Thanks for the help with that!

Creating an issue on your github page for the Reno theme.

  • Like 1
Posted

@neeks: do you have debug mode enabled? Any errors?

And why is autoload true? Process modules shouldn't have autoload enabled. It's better to create a "helper" module which extends wire if you need an autoload module

Posted

I will turn on debug mode and see if I can get any errors. (nothing is showing up in the log though).

@Nico knolI: Thanks, I think the issue is I have one module that is doing 4-5 related things to drafting pages and publishing them, but those things should probably be split into separate modules. (I think) A process module that is not auto load (which I just learned from your post), and then several autoload modules need access to the runtime hooks (altering page listings, adding draft buttons, edit draft buttons, etc.) 

  • Like 1
Posted

I think it would be enough to have ProcessDrafts (containing all of the markup and logic that is needed to display the drafts page) and ProcessDraftsAutoload (containing all the autoload stuff and hooks)

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...