View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
17847Bug reportsUser / Groups / Rolespublic2022-06-02 12:01
ReporterAiophe Assigned Toaesteban  
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Product Version4.4.15 
Summary17847: Template Permissions not correctly used when creating a new survey
Description

Hi,

I have set the template permissions per user to a specific template (template a), the rest is unchecked.
When a user now creates a new survey the template is prefilled with the theme "vanilla", which the user does not have a permission for.

I think this is a bug.
I'm running the LTS Branch currently under 3.27.28 and could reproduce it multiple times.

Steps To Reproduce

Steps to reproduce

  1. Create a new Template/Theme
  2. Create a new User
  3. Set the Template Permission for that User to only the new Template/Theme (Step 1)
  4. Create a new survey
  5. Go to General settings

Expected result

I'm expecting to only have one Option available under "Template" to choose from.

Actual result

I'm actually having two available options to choose from:

  1. Template/Theme "Vanilla"
  2. Template/Theme created in Step 1
TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build) 3.27.28
I will donate to the project if issue is resolvedNo
BrowserEdge 97.0.1072.55
Database type & versionMaria DB 10.5.13
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4.26

Users monitoring this issue

Aiophe

Activities

DenisChenu

DenisChenu

2022-01-24 11:35

developer   ~68076

If i don't make error : user have always read right on default template.

Aiophe

Aiophe

2022-01-24 11:43

reporter   ~68077

If that's the case, then the option under "Edit theme permissions" is misleading (should be grayed out or something like that)
What I found out in the meantime:

When I have "vanilla" set as global default theme (https://manual.limesurvey.org/Themes#Global_setting_default_theme), I have the options as discribed above.
When I have the Theme "Template A" set as global default theme, I have only the option for that Theme.

It looks like the User (even when the Permission is not given) always has the permission to choose from either the Templates/Themes he has the permissions for or the global set Template/Theme
SO I don't know if that's actually a bug or expected/wanted behaviour

gabrieljenik

gabrieljenik

2022-05-31 22:55

manager   ~70138

@c_schmitz Thoughts?

DenisChenu

DenisChenu

2022-06-01 08:13

developer   ~70152

If that's the case, then the option under "Edit theme permissions" is misleading (should be grayed out or something like that)

Yes : need a sentence somewhere.

c_schmitz

c_schmitz

2022-06-02 11:56

administrator   ~70203

In my opinion on new surveys only the permitted template should be selectable.
For existing surveys the already set template should be also available, even if it is outside current permission (so the user can still edit a survey).

DenisChenu

DenisChenu

2022-06-02 12:01

developer   ~70205

In my opinion on new surveys only the permitted template should be selectable.

Right : i just check : in 3.X
As user (create survey only)
default theme is used when create
Theme list is empty except default one

As super admin
Set another theme
Save

As user
Current theme is shown, list is empty.

User can not update theme, and when create : default theme is used.

Check same in 5.X ?

Issue History

Date Modified Username Field Change
2022-01-24 11:28 Aiophe New Issue
2022-01-24 11:33 Aiophe Issue Monitored: Aiophe
2022-01-24 11:33 Aiophe Bug heat 0 => 2
2022-01-24 11:35 DenisChenu Note Added: 68076
2022-01-24 11:35 DenisChenu Bug heat 2 => 4
2022-01-24 11:43 Aiophe Note Added: 68077
2022-01-24 11:43 Aiophe Bug heat 4 => 6
2022-01-24 13:42 ollehar Product Version => 4.4.15
2022-05-31 22:55 gabrieljenik Note Added: 70138
2022-05-31 22:55 gabrieljenik Bug heat 6 => 8
2022-06-01 00:36 gabrieljenik Status new => ready for code review
2022-06-01 00:36 gabrieljenik Assigned To => gabrieljenik
2022-06-01 08:13 DenisChenu Note Added: 70152
2022-06-01 14:17 gabrieljenik Status ready for code review => acknowledged
2022-06-02 11:56 c_schmitz Note Added: 70203
2022-06-02 11:56 c_schmitz Bug heat 8 => 10
2022-06-02 11:56 c_schmitz Assigned To gabrieljenik => aesteban
2022-06-02 11:56 c_schmitz Status acknowledged => assigned
2022-06-02 12:01 DenisChenu Note Added: 70205