[MAGNOLIA-5415] ConfiguredAccessDefinition has to always allow access to superuser Created: 24/Oct/13  Updated: 06/Nov/13  Resolved: 01/Nov/13

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 5.1.1
Fix Version/s: 5.2

Type: Bug Priority: Neutral
Reporter: Roman Kovařík Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by CNTCTSAPP-57 Add update task to convert old Adminc... Closed
is depended upon by MGNLCAT-100 Add update task to convert old Adminc... Closed
is depended upon by MGNLDAM-318 Add update task to convert old Adminc... Closed
is depended upon by MGNLGROOVY-83 Add update task to convert old Adminc... Closed
is depended upon by MGNLINTEMPL-37 Add update task to convert old Adminc... Closed
is depended upon by MGNLMAIL-21 Add update task to convert old Adminc... Closed
is depended upon by MGNLRES-70 Add update task to convert old Adminc... Closed
is depended upon by MGNLSTK-1249 Add update task to convert old Adminc... Closed
is depended upon by MGNLUI-2268 Add update tasks to convert old Admin... Closed
relation
is related to MGNLUI-2340 Deny renaming of superuser role Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

ConfiguredAccessDefinition has to always allow access to superuser.
Check for superuser role to allow access.
Renaming of superuser role should be disabled, see MGNLUI-2340.



 Comments   
Comment by Roman Kovařík [ 31/Oct/13 ]

This probably doesn't work:

for (Principal p : MgnlContext.getWebContext().getSubject().getPrincipals()) {
    if (p instanceof AdminPrincipal || p instanceof SystemPrincipal) {
        return true; // give this guy access no matter what
    }
}
Generated at Mon Feb 12 04:04:56 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.