textpattern / textpattern

A flexible, elegant, fast and easy-to-use content management system written in PHP.
https://textpattern.com
GNU General Public License v2.0
785 stars 111 forks source link

Make Dev Preview per user group #1759

Closed Bloke closed 2 years ago

Bloke commented 2 years ago

Currently, the dev preview theme feature is on/off for everyone.

On sites where the txp_user table is employed for customer accounts (front-end login stuff) they are usually assigned to a low-level user role or a new group made via plugin. Unfortunately, when these people log in via the front end, they see the in-dev theme by virtue of being "logged in" to Textpattern.

Consider making the dev preview a multi-select dropdown of user groups- which may be augmented by plugins - that defaults to all selected (for backwards compatibility). That way, access to this feature can be shut off to any groups if they are designated for front-end usage.

bloatware commented 2 years ago

Currently, the dev preview theme feature is on/off for everyone.

Really? In my tests it is per user, and freelancers have no dev preview ability. Don't remember though what happens when an admin user with dev preview enabled is lowered in privileges.

Bloke commented 2 years ago

Well, okay not everyone. Freelancers excepted. I guess if you're using a plugin to extend the capabilities, then you could just turn that priv off for your new group, or clone the freelancer priv level.

Maybe this isn't worth considering then. Just an idea.

Bloke commented 2 years ago

What I meant was, the groupings are hard-coded at present. Only a plugin can alter them. So if you wanted to extend it to Copy Editors then you can't, short of hacking the core or writing/using a plugin. Maybe that's fine, actually.

bloatware commented 2 years ago

It is called skin.preview, fwiw.

Bloke commented 2 years ago

Yeah, found it. Ignore me.