View Issue Details

This bug affects 1 person(s).
 16
IDProjectCategoryView StatusLast Update
19015Bug reportsUser / Groups / Rolespublic2024-10-28 17:41
Reporteradamzammit Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version6.2.0-dev 
Summary19015: User with superadmin role does not get superadmin privileges
Description

When a role is created and assigned as "superadmin", then a user is assigned to that role, the superadmin privileges do not carry over

Steps To Reproduce

Steps to reproduce

Create a new role (called "SUPER")
Assign superadmin privileges
Create a new user without privileges ("testuser")
Assign "testuser" to the role "SUPER"

Expected result

"testuser" has superadmin privileges

Actual result

"testuser" has no privileges

TagsNo tags attached.
Bug heat16
Complete LimeSurvey version number (& build)6.2.0
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMariadb 10.5
Server OS (if known)
Webserver software & version (if known)
PHP Version8.1

Relationships

has duplicate 19789 closedDenisChenu User role with superadmin / read didn't give superadmin permission 

Users monitoring this issue

There are no users monitoring this issue.

Activities

adamzammit

adamzammit

2023-08-07 07:07

developer   ~76443

Appears to be due to:

https://github.com/LimeSurvey/LimeSurvey/blob/7bc0fad37ebfcf97d1905a7630fe89a9e846b02e/application/models/Permission.php#L573

superadmin only being checked if assigned directly to user - not if it falls within a role.

I've written a hacky workaround for this but I'll wait and see if there is a proposed solution before submitting a PR

DenisChenu

DenisChenu

2023-09-07 18:35

developer   ~76907

I hate role … i really think it's muts be done in plugin and ONLY in plugin …$

@gabrieljenik : interested ?

gabrieljenik

gabrieljenik

2023-09-07 18:38

manager   ~76909

Does this only happens with superadmin?
If so, maybe just have superadmin not to be part of roles? After all, not sure if I want that permission to be part of a role.

DenisChenu

DenisChenu

2023-09-08 16:04

developer   ~76923

It's totally related to superadmin

If so, maybe just have superadmin not to be part of roles? After all, not sure if I want that permission to be part of a role.

I say a +33 except some user want this … then : must keep the possibility.

I have idea here , i keep it.

DenisChenu

DenisChenu

2023-09-11 17:19

developer   ~76942

https://github.com/LimeSurvey/LimeSurvey/pull/3434

DenisChenu

DenisChenu

2023-09-11 17:21

developer   ~76943

@adamzammit maybe ypou can test (and make some proposition about the code)

gabrieljenik

gabrieljenik

2023-09-13 16:35

manager   ~77009

@DenisChenu I see I am not requested reviewer on Github. Just let me know if you want me to review or Adam. Thanks

DenisChenu

DenisChenu

2023-09-13 16:55

developer   ~77010

Oups …
I think Addam can test (and have a look) but you review.

Sorry

DenisChenu

DenisChenu

2024-10-04 10:41

developer   ~81163

Have review by Adam + unit test

DenisChenu

DenisChenu

2024-10-04 17:16

developer   ~81166

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=36580

tibor.pacalat

tibor.pacalat

2024-10-04 17:16

administrator   ~81167

Tested and merged.

LimeBot

LimeBot

2024-10-28 17:41

administrator   ~81311

Fixed in Release 6.6.7+241028

Related Changesets

LimeSurvey: master fe120607

2024-10-04 19:16

DenisChenu

Committer: GitHub


Details Diff
Fixed issue 19015: User with superadmin role does not get superadmin privileges (#3434) Affected Issues
19015
mod - application/models/Permission.php Diff File
mod - tests/unit/models/UserInPermissionRoleTest.php Diff File

Issue History

Date Modified Username Field Change
2023-08-07 07:05 adamzammit New Issue
2023-08-07 07:07 adamzammit Note Added: 76443
2023-08-07 07:07 adamzammit Bug heat 0 => 2
2023-08-07 12:21 ollehar Assigned To => DenisChenu
2023-08-07 12:21 ollehar Status new => assigned
2023-09-07 18:35 DenisChenu Note Added: 76907
2023-09-07 18:35 DenisChenu Bug heat 2 => 4
2023-09-07 18:38 gabrieljenik Note Added: 76909
2023-09-07 18:38 gabrieljenik Bug heat 4 => 6
2023-09-08 16:04 DenisChenu Note Added: 76923
2023-09-11 17:19 DenisChenu Status assigned => ready for code review
2023-09-11 17:19 DenisChenu Note Added: 76942
2023-09-11 17:21 DenisChenu Note Added: 76943
2023-09-11 17:21 DenisChenu Assigned To DenisChenu => gabrieljenik
2023-09-13 16:35 gabrieljenik Note Added: 77009
2023-09-13 16:55 DenisChenu Note Added: 77010
2024-10-04 10:39 DenisChenu Relationship added has duplicate 19789
2024-10-04 10:39 DenisChenu Bug heat 6 => 12
2024-10-04 10:41 DenisChenu Assigned To gabrieljenik => tibor.pacalat
2024-10-04 10:41 DenisChenu Status ready for code review => ready for testing
2024-10-04 10:41 DenisChenu Note Added: 81163
2024-10-04 17:16 DenisChenu Changeset attached => LimeSurvey master fe120607
2024-10-04 17:16 DenisChenu Note Added: 81166
2024-10-04 17:16 DenisChenu Assigned To tibor.pacalat => DenisChenu
2024-10-04 17:16 DenisChenu Resolution open => fixed
2024-10-04 17:16 tibor.pacalat Status ready for testing => resolved
2024-10-04 17:16 tibor.pacalat Note Added: 81167
2024-10-04 17:16 tibor.pacalat Bug heat 12 => 14
2024-10-28 17:41 LimeBot Note Added: 81311
2024-10-28 17:41 LimeBot Status resolved => closed
2024-10-28 17:41 LimeBot Bug heat 14 => 16