Neeks Posted April 4, 2015 Posted April 4, 2015 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.
renobird Posted April 4, 2015 Posted April 4, 2015 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.
Neeks Posted April 4, 2015 Author Posted April 4, 2015 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?
renobird Posted April 4, 2015 Posted April 4, 2015 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,
Neeks Posted April 4, 2015 Author Posted April 4, 2015 Ha! that did it!!! Thanks for the help with that! Creating an issue on your github page for the Reno theme. 1
Nico Knoll Posted April 5, 2015 Posted April 5, 2015 @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
Neeks Posted April 5, 2015 Author Posted April 5, 2015 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.) 1
Nico Knoll Posted April 6, 2015 Posted April 6, 2015 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) 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now