Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow some read-only admin settings when allowAdminChanges = false #4371

Closed
mijewe opened this issue Jun 6, 2019 · 17 comments
Closed

Allow some read-only admin settings when allowAdminChanges = false #4371

mijewe opened this issue Jun 6, 2019 · 17 comments
Labels
enhancement improvements to existing features system administration 💼 features related to system administration

Comments

@mijewe
Copy link

mijewe commented Jun 6, 2019

Description

I'd like to be able to see (as in, read-only) some admin settings, even if allowAdminChanges is false.

For example, I want to check my SMTP details are correct, but I don't want to allow them to be changed since I want them controlled through the yaml.

Currently I'm changing allowAdminChanges to true, having a quick peek to check everything's in order, then setting it to false again, which isn't ideal.

  • Craft version: 3.1.28
  • PHP version: 7.3
  • Database driver & version:
  • Plugins & versions:
@proimage
Copy link

For what it's worth, I'd suggest having read-only Settings section access be restricted to Admins only.

Is there any sort of ETA for this? 3.5? 4.0?

@brandonkelly
Copy link
Member

Would need to be 4.0 at the earliest, since plugins are also involved in showing their settings, and currently they don't have to worry about the possibility of a read-only mode.

@proimage
Copy link

proimage commented May 28, 2020

Hmm... all those settings are saved in the Project Config, right? What about a stopgap solution where you allow admins to basically view the contents of project.yaml in some form or another, right in the backend? It doesn't need to be fancy, just functional. At the most rudimentary, perhaps a phpinfo()-style page that just prints out the project.yaml contents, where you can use native browser search to find the setting you're interested in?

A very useful enhancement to something like that would be to present that raw project.yaml info hierarchically, in an accordion (<details> & <summary>, perhaps?) or something. Add a simple "Expand all" / "Collapse all" button at the top to allow in-page browser searching, and that's it.

¯\_(ツ)_/¯

@brandonkelly
Copy link
Member

I don’t think the settings views should look significantly different when admin changes are disabled. Maybe we could introduce a new “Project Config” utility instead, similar to PHP Info.

@proimage
Copy link

That would definitely suffice for me! :)

@brandonkelly brandonkelly added this to the 3.5 milestone Jun 2, 2020
@proimage
Copy link

proimage commented Jun 5, 2020

Does it also make sense to have the Craft log files viewable via the backend? I could certainly stand to have that functionality on a production site I'm working on right now (GUI DB backup failed, said to check Craft logs for details, but I don't have access to the load-balanced servers...).

brandonkelly added a commit that referenced this issue Jul 10, 2020
@brandonkelly
Copy link
Member

We’ve added a new Project Config utility for the next Craft 3.5 beta release! In addition to giving you a dump of the current project config data, it also provides handy access to a couple project config maintenance actions.

The new Project Config utility coming in Craft 3.5

@mmikkel
Copy link
Contributor

mmikkel commented Aug 17, 2021

The fact that setting allowAdminChanges to false makes the Settings section completely inaccessible is still a big pet peeve of mine in dealing with Project Config. The utility exposes the current contents of the project config itself, but that data isn't necessarily the same thing as the actual current settings in the database. It's also much less efficient than it would be to simply open up the appropriate Settings page, when needing to quickly review/check current settings in a production environment.

I realise this issue is closed, but would propose to re-open the FR in discussions.

@brandonkelly
Copy link
Member

Fair enough, I’ll reopen.

@brandonkelly brandonkelly reopened this Aug 17, 2021
@proimage
Copy link

Perhaps disabling the Save button throughout the Admin section could be a simple & temporary solution?

@acekevin
Copy link

acekevin commented Sep 15, 2021

To help add context, we have engineering managers and project managers who would prefer to review the Section, Settings, and Entry Type structures of our CraftCMS for team discussion but we don't want to risk someone could edit these concepts on our staging and production environments. Having allowAdminChanges=false lock Settings into a read-only mode would help the team continue to ideate and discuss the CraftCMS structure without danger of altering it.

While I think the Project Config utility above is a great add, it doesn't quite meet the use case of easy viewability into the structure of our sites.

@ryanmasuga
Copy link

I needed to see some email settings today. I don't have the site locally, and simply needed to confirm what production was using. I had to contact a dev - who had to spend time getting the site up to date on their machine to look. What should have taken 1 minute took 20 minutes.

Would be far easier to look at these settings in a read only way.

@timkelty
Copy link
Contributor

timkelty commented Feb 7, 2022

An alternative, and potentially more useful approach than making things "read-only", would be for admins to be able to manually toggle allowAdminChanges, from the CP, for the duration of their session.

Apart from solving being able to see config, it would also allow admins to make "emergency" changes, where initiating a deployment might be undesirable, or impossible.

@ryanmasuga
Copy link

Got bit by this two times in one day. Needed to look at some Solspace Freeform settings to confirm something for client, only to find that I cannot see those on live site. I don't have local copy of this site, so I have to ask one of our devs. This is a great way for devs to log more billable hours!

@mmikkel
Copy link
Contributor

mmikkel commented Feb 8, 2022

An alternative, and potentially more useful approach than making things "read-only", would be for admins to be able to manually toggle allowAdminChanges, from the CP, for the duration of their session.

Apart from solving being able to see config, it would also allow admins to make "emergency" changes, where initiating a deployment might be undesirable, or impossible.

That would sort of solve it, I guess. I still think the ideal solution would be to have the Settings section always available, in a read-only state and without having to expose the project config for changes at all.

@timkelty
Copy link
Contributor

timkelty commented Feb 8, 2022

I still think the ideal solution would be to have the Settings section always available, in a read-only state and without having to expose the project config for changes at all.

Fair enough, maybe my solution is a separate use case then.

@brandonkelly brandonkelly removed this from the 3.5 milestone May 23, 2022
@brandonkelly
Copy link
Member

Craft 5.6.0 is out, which now shows read-only system and plugin settings when allowAdminChanges is disabled (#16265) 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improvements to existing features system administration 💼 features related to system administration
Projects
None yet
Development

No branches or pull requests

7 participants