Limit book creation to superadmins

40 views
Skip to first unread message

Bill Fitzgerald

unread,
Jun 1, 2014, 3:26:50 PM6/1/14
to press...@googlegroups.com
Hello,

In setting up the Pressbooks defaults, we have an option to control who can create new sites/books. Quoting from the readme.txt at https://github.com/pressbooks/pressbooks/blob/dev/readme.txt :

8. Pick the most appropriate Registration Setting:
    + User accounts may be registered. (do not use this setting, since it will not allow users to create new books)
    + Logged in users may register new sites. (if you are a publisher using PressBooks as a production tool, this is the
      best setting: it allows network administrators to add new users, who can then create books/sites. However,
      registration is not available to the public.)
    + Both sites and user accounts can be registered. (use this setting if you intend on offering a publishing-platform
      open to the public, such as PressBooks.com)

With these options, we either have a situation where any user (even a member who is just a subscriber on a single site) can create new books, or the ability for users to create new books is turned off.

I was working under the assumption that, even with book creation turned *off* for regular users, that super admins would still be able to create new books. However, unless I'm missing something obvious (always a possibility) superadmins are also bound by the Registration settings.

Which brings me to my question: how can we create a situation where superadmins - and only superadmins - can create new books?


Dac Chartrand

unread,
Jun 3, 2014, 9:52:56 AM6/3/14
to press...@googlegroups.com
Books are sites. If you are a superadmin you should be able to create a site in Network Admin.

Bill Fitzgerald

unread,
Jun 3, 2014, 11:31:25 AM6/3/14
to Dac Chartrand, press...@googlegroups.com

That's the issue.

Superadmins can't create sites unless "Logged in users can register new sites" is selected.

--
You received this message because you are subscribed to a topic in the Google Groups "PressBooks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pressbooks/r9HQbx1IbJI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pressbooks+...@googlegroups.com.
Visit this group at http://groups.google.com/group/pressbooks.

Bill Fitzgerald

unread,
Jun 3, 2014, 8:34:45 PM6/3/14
to press...@googlegroups.com, dac.ch...@gmail.com

Okay - more info here.

With registration options set to either "Registration is disabled" or "User accounts may be registered" superadmins cannot create books by using the "Add A New Book" link that appears in the "My Catalog" menu. This link points to http://yoursite.com/wp-signup.php

However, if a superadmin navigates to http://yoursite.com/wp-admin/network/site-new.php they *can* create new books, with no issue. 

From this, it looks like the default WP screen respects the superadmin rights, but the Pressbooks-generated book screen does not recognize the rights of the superadmin role.

To unsubscribe from this group and all its topics, send an email to pressbooks+unsubscribe@googlegroups.com.

Hugh McGuire

unread,
Jun 4, 2014, 9:26:10 AM6/4/14
to Bill Fitzgerald, press...@googlegroups.com, Dac Chartrand
That is correct.

If you'd like to extend the registration module ... we'll be happy to look at it... 

 


--
You received this message because you are subscribed to the Google Groups "PressBooks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pressbooks+...@googlegroups.com.



--
---------------------------------------------------------------
hughmcguire.net | twitter.com/hughmcguire 
skype. h.mcguire | tel. +1.514.464.2047
---------------------------------------------------------------

Bill Fitzgerald

unread,
Jun 4, 2014, 9:40:36 AM6/4/14
to press...@googlegroups.com, bi...@funnymonkey.com, dac.ch...@gmail.com
Okay - good to know. I thought I was missing something obvious here. So this is by design?

If we were going to address this, our change would just make the custom PB "Add New Book" page behave like the core Wordpress "Add New Site" page, where superadmins can add new Books regardless of the registration settings. Is this functionality you want in PB? If so, we'll follow up in github with a pull request. We're nailing out some additional details on our project, so it'll probably be 1-2 weeks before we hit this.
To unsubscribe from this group and all its topics, send an email to pressbooks+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "PressBooks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pressbooks+...@googlegroups.com.
Visit this group at http://groups.google.com/group/pressbooks.

Hugh McGuire

unread,
Jun 4, 2014, 10:02:40 AM6/4/14
to Bill Fitzgerald, press...@googlegroups.com, Dac Chartrand
It's not exactly by design; it's just that our own main usecase (pressbooks.com) does not need the feature you want -- ad pressbooks.com drives our own dev approach to things. 

As with everything, we have to make sure nothing breaks on PB.com before we integrate into "PB core" ...  

Bill Fitzgerald

unread,
Jun 4, 2014, 10:45:00 AM6/4/14
to Hugh McGuire, press...@googlegroups.com, Dac Chartrand
That makes total sense. Thank you for the clarification.

We'll get something set that (hopefully) works across all use cases.
Reply all
Reply to author
Forward
0 new messages