View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
18495Bug reportsLabel setspublic2023-07-31 15:02
ReporterShiXiong Assigned ToDenisChenu  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Product Version5.4.x 
Fixed in Version6.2.0-dev 
Summary18495: configuration tab is not visible to a user with only create label set permission
Description

This issue is detected while the testing label sets permission.
"Create" labels --> should be able to create and view your own label sets
"View" labels --> should be able to view all label sets in the system, created by anyone

Steps To Reproduce

Steps to reproduce

  1. create a new user in the user management.
  2. set permission "create label sets" only.
  3. logout and log in again with a new user.
  4. configuration tab is not visible.

Expected result

configuration tab should be visible and the user can view label sets created by self.

Actual result

as the configuration is not, the user can't create/view own label sets

TagsNo tags attached.
Attached Files
1.png (135,664 bytes)
2.png (80,608 bytes)   
2.png (80,608 bytes)   
3.png (114,987 bytes)
4.png (84,427 bytes)   
4.png (84,427 bytes)   
Bug heat12
Complete LimeSurvey version number (& build)6
I will donate to the project if issue is resolvedNo
Browserchrome
Database type & versionmysql
Server OS (if known)
Webserver software & version (if known)
PHP Version8.0

Relationships

related to 18987 new Feature requests Allow updating Owner of a label set 
related to 18988 new Feature requests Allow more than one user to edit specific label set 
related to 18989 new Feature requests Hide some label sets in list of label sets 
related to 18916 new Bug reports User with create user permission can not create user 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2022-11-17 16:11

developer   ~72803

Last edited: 2022-11-17 16:14

There are no owner of Label sets … (currenlly)

then "Create label sets" can not be really used …
We need more

  • Use ALL label set
  • Manage ALL label set (create/update/delete)

The way you ask is moire a feature request
https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/Interfaces/PermissionInterface.php
https://github.com/LimeSurvey/LimeSurvey/blob/master/application/models/Traits/PermissionTrait.php
https://github.com/LimeSurvey/LimeSurvey/tree/master/application/extensions/UserPermissionsWidget

ShiXiong

ShiXiong

2022-11-17 20:58

developer   ~72805

I noted this bug always exists if view permission is not added.
Regardless of what role you have, if you don't have view permission, the configuration tab is not showing in any case.

DenisChenu

DenisChenu

2022-11-18 09:26

developer   ~72807

Regardless of what role you have, if you don't have view permission, the configuration tab is not showing in any case.

Yes, it's more related to the current situation … where create need view.

Maybe start by update sentence ?

And create a feature request to have a complete Permission system for label start by owner , and after adding permission by single label set.

gabrieljenik

gabrieljenik

2022-12-02 21:44

manager   ~72990

Will try to reproduce

DenisChenu

DenisChenu

2022-12-08 09:06

developer   ~73022

@gabrieljenik : in my opinion, the only way to really fix the issue if to create (minimal) Permission system
Maybe starting only with owner ?
https://github.com/LimeSurvey/LimeSurvey/blob/872336377c64a243db8f4210e3f8942c9429897d/application/models/Traits/PermissionTrait.php#L10

The user can add only to own Label sets ?
(and maybe create a label set edition to allow to update owner)

After : unsure on the "list" ?
If user have 'read' right : he can see all Label set
If user didn't have 'read' right : he see only own label set

gabrieljenik

gabrieljenik

2022-12-08 13:21

manager   ~73036

Last edited: 2022-12-08 13:21

Let me re-approach the whole issue.

From the very begginig it is said:

"Create" labels --> should be able to create and view your own label sets

Are we sure about that? Where is that stated?

As labels have no owners, it means labels can be generally managed by anyone who has access to labels.

So, maybe

  • this is not a bug
  • view permission is needed to access the screen
  • create permission is needed to then go the extra mile and create labels.

Thoughts?

PS: Yes if we want to have label owners, we would need a FR

DenisChenu

DenisChenu

2022-12-08 14:20

developer   ~73039

Last edited: 2022-12-08 14:22

"Create" labels --> should be able to create and view your own label sets

Are we sure about that? Where is that stated?

There are no state here … but this clearly seems as an issue :) because if you chjeck only Create label : there are no way to create label.

Thoughts?

Same then your 3 points

PS: Yes if we want to have label owners, we would need a FR

Right

EDIT

As labels have no owners, it means labels can be generally managed by anyone who has access to labels.

No owner and no single permission. Managed according to Global Permission.

gabrieljenik

gabrieljenik

2022-12-08 14:52

manager   ~73040

if you chjeck only Create label : there are no way to create label.

I think this is a matter of procedure for permission giving.
Not a bug.

From the top of my head, it is common to need to give create and view permission at the same time.

DenisChenu

DenisChenu

2022-12-08 15:01

developer   ~73041

I think this is a matter of procedure for permission giving.

Maybe need to give more detail on GUI for a quick fix, ading the real fix (owner) in a feature request if LS GMBH team want it.

Permission to create, view, update, delete, export and import label sets/labels

PS : we have near same issue with Theme
User have owner but there are complex situation with group (enable or not)
UserGroup didn't use owner : https://github.com/LimeSurvey/LimeSurvey/pull/2581 + https://bugs.limesurvey.org/view.php?id=18294
PS : PR 2581 is a quick fix to have NO difference between 3 and 5 , yes usage of owner_id is needed but broke API if used.

gabrieljenik

gabrieljenik

2023-05-17 23:40

manager   ~75057

Is this a bug? What do you think @tibo.pascalat ?

tibor.pacalat

tibor.pacalat

2023-05-19 11:22

administrator   ~75099

@gabrieljenik if the system wasn't designed to support this, this is clearly a feature request. Otherwise, it is a bug.

@ollehar @c_schmitz what do you think? Should this be implemented? IMO if there is a need for user with such permissions, we should do it, otherwise no.

DenisChenu

DenisChenu

2023-05-19 12:03

developer   ~75103

if there is a need for user with such permissions

There are clearly NEED of a complete

  1. LabelSets permission
  2. SurveyTheme permission

Like we have for Survey and SurveyGroups

ollehar

ollehar

2023-06-02 15:39

administrator   ~75388

This discussion seems derailed? From the bug description, it seems like a pretty obvious bug. I didn't test it tho.

ollehar

ollehar

2023-06-02 15:40

administrator   ~75389

There are no owner of Label sets … (currenlly)

Ah sorry, missed this one.

ollehar

ollehar

2023-06-02 15:41

administrator   ~75390

What about adding a new column for label set ownership as a start? owner_id.

ollehar

ollehar

2023-06-02 15:43

administrator   ~75391

Maybe starting only with owner ?
https://github.com/LimeSurvey/LimeSurvey/blob/872336377c64a243db8f4210e3f8942c9429897d/application/models/Traits/PermissionTrait.php#L10

+1

DenisChenu

DenisChenu

2023-06-02 16:02

developer   ~75393

I can take it .
Denis

DenisChenu

DenisChenu

2023-06-02 17:58

developer   ~75404

Adding minimal Permission : usage of owner.

DenisChenu

DenisChenu

2023-06-08 16:51

developer   ~75481

This fix related issue too.
(and i think another one to be reported)

ollehar

ollehar

2023-06-09 12:32

administrator   ~75509

Changed severity to "feature".

DenisChenu

DenisChenu

2023-06-23 12:30

developer   ~75835

Next feature
v6.X : user can create own label sets and manage own labels set
v6.Y : user can create label set and give to any other user (and this user can manage totally the label set)
v6.Z : after adding all Permission : user can share is label set with some specific other users.

We are at 6.X currently

DenisChenu

DenisChenu

2023-07-24 15:24

developer   ~76245

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

LimeBot

LimeBot

2023-07-31 15:02

administrator   ~76373

Fixed in Release 6.2.0+230732

Related Changesets

LimeSurvey: master b70aa3b8

2023-07-03 17:25:28

DenisChenu


Committer: GitHub Details Diff
Fixed issue 18495: configuration tab is not visible to a user with only create label set permission (#3185) Affected Issues
18495
mod - application/config/version.php Diff File
mod - application/controllers/admin/Labels.php Diff File
mod - application/helpers/admin/import_helper.php Diff File
mod - application/helpers/admin/label_helper.php Diff File
mod - application/helpers/update/updates/Update_608.php Diff File
add - application/helpers/update/updates/Update_609.php Diff File
mod - application/models/Interfaces/PermissionInterface.php Diff File
mod - application/models/LabelSet.php Diff File
mod - application/models/Survey.php Diff File
mod - application/views/admin/labels/_labelviewtabcontent_view.php Diff File
mod - application/views/admin/labels/labelview_view.php Diff File
mod - application/views/admin/super/_configuration_menu.php Diff File
mod - application/views/admin/survey/Question/_subQuestionsAndAnwsersJsVariables.php Diff File
mod - assets/scripts/admin/questionEditor.js Diff File
mod - installer/create-database.php Diff File
add - tests/functional/backend/LabelSetsCreateUpdate.php Diff File

Issue History

Date Modified Username Field Change
2022-11-17 16:03 ShiXiong New Issue
2022-11-17 16:03 ShiXiong File Added: 1.png
2022-11-17 16:03 ShiXiong File Added: 2.png
2022-11-17 16:03 ShiXiong File Added: 3.png
2022-11-17 16:03 ShiXiong File Added: 4.png
2022-11-17 16:11 DenisChenu Note Added: 72803
2022-11-17 16:11 DenisChenu Bug heat 0 => 2
2022-11-17 16:14 DenisChenu Note Edited: 72803
2022-11-17 20:58 ShiXiong Note Added: 72805
2022-11-17 20:58 ShiXiong Bug heat 2 => 4
2022-11-18 09:26 DenisChenu Note Added: 72807
2022-12-02 21:44 gabrieljenik Assigned To => gabrieljenik
2022-12-02 21:44 gabrieljenik Status new => acknowledged
2022-12-02 21:44 gabrieljenik Note Added: 72990
2022-12-02 21:44 gabrieljenik Bug heat 4 => 6
2022-12-02 21:53 gabrieljenik Assigned To gabrieljenik =>
2022-12-02 21:53 gabrieljenik Status acknowledged => confirmed
2022-12-07 19:40 gabrieljenik Assigned To => gabrieljenik
2022-12-07 19:40 gabrieljenik Status confirmed => assigned
2022-12-08 09:06 DenisChenu Note Added: 73022
2022-12-08 13:21 gabrieljenik Note Added: 73036
2022-12-08 13:21 gabrieljenik Note Edited: 73036
2022-12-08 14:20 DenisChenu Note Added: 73039
2022-12-08 14:21 DenisChenu Note Edited: 73039
2022-12-08 14:22 DenisChenu Note Edited: 73039
2022-12-08 14:52 gabrieljenik Note Added: 73040
2022-12-08 15:01 DenisChenu Note Added: 73041
2023-05-17 23:40 gabrieljenik Assigned To gabrieljenik => tibor.pacalat
2023-05-17 23:40 gabrieljenik Status assigned => feedback
2023-05-17 23:40 gabrieljenik Note Added: 75057
2023-05-19 11:22 tibor.pacalat Note Added: 75099
2023-05-19 11:22 tibor.pacalat Bug heat 6 => 8
2023-05-19 12:03 DenisChenu Note Added: 75103
2023-06-02 15:39 ollehar Note Added: 75388
2023-06-02 15:39 ollehar Bug heat 8 => 10
2023-06-02 15:40 ollehar Note Added: 75389
2023-06-02 15:41 ollehar Note Added: 75390
2023-06-02 15:43 ollehar Note Added: 75391
2023-06-02 16:02 DenisChenu Note Added: 75393
2023-06-02 17:58 DenisChenu Assigned To tibor.pacalat => DenisChenu
2023-06-02 17:58 DenisChenu Status feedback => assigned
2023-06-02 17:58 DenisChenu Note Added: 75404
2023-06-08 16:51 DenisChenu Assigned To DenisChenu => gabrieljenik
2023-06-08 16:51 DenisChenu Status assigned => ready for code review
2023-06-08 16:51 DenisChenu Complete LimeSurvey version number (& build) demo => 6
2023-06-08 16:51 DenisChenu Note Added: 75481
2023-06-09 11:22 DenisChenu Assigned To gabrieljenik => ollehar
2023-06-09 11:24 DenisChenu Status ready for code review => in code review
2023-06-09 12:32 ollehar Priority none => normal
2023-06-09 12:32 ollehar Severity partial_block => feature
2023-06-09 12:32 ollehar Note Added: 75509
2023-06-23 12:00 DenisChenu Relationship added related to 18916
2023-06-23 12:30 DenisChenu Note Added: 75835
2023-07-24 15:24 DenisChenu Changeset attached => LimeSurvey master b70aa3b8
2023-07-24 15:24 DenisChenu Note Added: 76245
2023-07-24 15:24 DenisChenu Assigned To ollehar => DenisChenu
2023-07-24 15:24 DenisChenu Resolution open => fixed
2023-07-26 10:12 DenisChenu Relationship added related to 18987
2023-07-26 10:16 DenisChenu Relationship added related to 18988
2023-07-26 10:20 DenisChenu Relationship added related to 18989
2023-07-26 10:20 DenisChenu Status in code review => resolved
2023-07-26 10:20 DenisChenu Fixed in Version => 6.2.0-dev
2023-07-31 15:02 LimeBot Note Added: 76373
2023-07-31 15:02 LimeBot Status resolved => closed
2023-07-31 15:02 LimeBot Bug heat 10 => 12