Survey permissions prevent questions from being added

Bug #1910444 reported by Dawn Dale
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Undecided
Steven Mayo

Bug Description

In 4.6.1 I am not able to add a survey because it will not allow me to add the answer to the question. It asks for a "Change Operator". When I click ok it only comes back up. When I click no it goes away but will not save. See the attached screenshot. I have global admin privileges.

Revision history for this message
Dawn Dale (ddale) wrote :
summary: - Survey will not allow answers to the question
+ Survey permissions prevent questions from being added
Revision history for this message
Terran McCanna (tmccanna) wrote :

This continues to be a problem in Evergreen 3.8 - the only user that can successfully add questions to a survey is the main admin user. All other users show the login modal.

To recreate this problem on an Evergreen test server such as https://demo.evergreencatalog.com/eg/staff/ ...

1) Log in as a Local Administrator such as br1wrandall / williamr1234 that has all survey perms (CREATE_SURVEY, UPDATE_SURVEY, DELETE_SURVEY, ADMIN_SURVEY)
2) Create a new survey (Administration > Local Administration > Surveys)
3) Try to add a question to the survey. (The login modal will pop up and will only allow an override with the primary admin account.)

tags: added: admin-pages permissions
Revision history for this message
Elizabeth Davis (elidavis) wrote :

I'm experiencing this on a test instance of 3.9.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Susan Morrison (smorrison425) wrote :

To follow up on comment #2, on 3.8, Global Admins are no longer able to add questions to surveys, even with all survey perms. Once a new survey is created, when you try to add a question, the login modal pops up, with no ability to override.

Revision history for this message
Steven Mayo (stmayo) wrote :

The perl was getting the org_unit to look for the survey perms at in the wrong way, possibly because the structure of the survey object angular passed to perl had changed. Updated the way perl looks for the org_unit that owns the survey, and also added UPDATE_SURVEY to the list of perms that allows someone to change survey questions and answers.

Branch here: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/smayo/lp1910444-Survey_Permissions_Prevent_Adding_Questions

tags: added: pullrequest
Revision history for this message
Galen Charlton (gmc) wrote :

Upon looking at this, a common pattern to consider instead is seeing if $survey->owner is a reference, i.e., do something like this:

my $owner = ref($survey->owner) ? $survey->owner->d : $survey->owner;

That way, the method can be updated to not care whether the survey owner field is fleshed or not.

Galen Charlton (gmc)
tags: added: needswork
removed: pullrequest
Changed in evergreen:
assignee: nobody → Steven Mayo (stmayo)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.