There are 3 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-72d655d8-0523-42bc-bc47-93a276e0f211 XWIKI-22942 Open

isSuperAdmin is implemented in many different ways

 
View issue   ยท   Add comment
 

3 comments

 
cid:jira-generated-image-avatar-41758415-cfa2-4209-9790-ec72a7bc0739 Vincent Massol on 06/Nov/25 13:50
 

Manuel Leduc we do have a single source of truth, it's https://github.com/xwiki/xwiki-platform/blob/fb8e06afa1a7e46e33ce311eb4b09be81b0567f6/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-api/src/main/java/org/xwiki/user/SuperAdminUserReference.java#L30

All the other places need to be converted to UserReference and then use an equality check.

 
cid:jira-generated-image-avatar-41758415-cfa2-4209-9790-ec72a7bc0739 Vincent Massol on 06/Nov/25 13:50
 
[~mleduc] we do have a single source of truth, it's https://github.com/xwiki/xwiki-platform/blob/fb8e06afa1a7e46e33ce311eb4b09be81b0567f6/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-api/src/main/java/org/xwiki/user/SuperAdminUserReference.java#L30

All the other places need to be converted to
{{ UserReference }} and then use an equality check.
 
cid:jira-generated-image-avatar-41758415-cfa2-4209-9790-ec72a7bc0739 Vincent Massol on 06/Nov/25 13:51
 
[~mleduc] we do have a single source of truth, it's https://github.com/xwiki/xwiki-platform/blob/fb8e06afa1a7e46e33ce311eb4b09be81b0567f6/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-api/src/main/java/org/xwiki/user/SuperAdminUserReference.java#L30

All the other places need to be
deprecated, converted to {{UserReference}} and then use an equality check.