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

Maintenance mode from CONFIG file #249

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

MiCKov3r
Copy link
Contributor

Hi, I made a small fix in the code, in case someone wants to do maintenance on the live environment and needs to disable login/editing. The setting is done via the CONFIG file, so it doesn't need to change the localization.

CONFIG.PHP

return [
'maintenance' => 'Oops! Under maintenance.'
];

This setting is checked

  • when logging in, it just hides the login window
  • when checking the role, function isAllowed
  • displaying a 401 error, where information about system maintenance is added

What do you think about it?
Resolves #206

@MiCKov3r
Copy link
Contributor Author

It occurred to me that I tested this solution for my implementation when I call COCKPIT from PHP.
I'll do some more tests when calling via API :)

@MiCKov3r
Copy link
Contributor Author

MAINTENANCE mode now accepts READ permissions and the ADMIN role still has full access

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: "maintenance mode"
1 participant