- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:31 PM - edited 11-27-2023 09:32 PM
Hi, I found the below sentence in the ACL regarding the survey on my instance
"Allow read for records in asmt_assessment_instance, if the user has the assessment_admin role, or if the user has one of the metric type's roles."
I would like to know the list of these roles which are "metric type's roles."
I would appreciate if you give me such information.
#survey #metric #roles
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:50 PM - edited 11-27-2023 09:51 PM
Hi,
Assessments can be created for any purpose and there are many Metric Types available (or created when we install respective plugin).
For example when we go for Change Risk Assessment we have particular assessment metric type.
You can find All metric types in table "asmt_metric_type" and if you add Roles column you can find related Roles.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:59 PM
You can find these roles here:
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 10:02 PM
Hi @_imuya
The ACL that you are talking about gives the Requires roles read access to the questions and responses for the assessment metrics which usually contains generic admin roles.
Additionally, if you want certain roles to have read access to the questionnaires, you need to add them to the assessment metric type record on the Roles list field.
eg for Vendor Satisfaction Assessment, which is OOB metric type gives read access to sn_vlm.vendor_manager role.
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 10:02 PM
Hi @_imuya,
On this particular ACL, the key is to look at the Script field.
(current.user == gs.getUserID()) || (new AssessmentUtils()).hasAssessmentRoles(current.metric_type.roles) || (new SNC.AssessmentCreation().isGuestUserTakingPublicSurvey(current.metric_type.sys_id, gs.getUserId()));
Look at the section where the hasAssessmentRoles method from the AssessmentUtils Script Include is being called. The parameter being passed to it is 'current.metric_type.roles'. Metric type is a reference field on the Assessment Instance table and it references the Assessment Metric Type table which, in turn, has a Roles field (look below).
This is where the list of roles is coming from.
Hope this answered your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:50 PM - edited 11-27-2023 09:51 PM
Hi,
Assessments can be created for any purpose and there are many Metric Types available (or created when we install respective plugin).
For example when we go for Change Risk Assessment we have particular assessment metric type.
You can find All metric types in table "asmt_metric_type" and if you add Roles column you can find related Roles.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:59 PM
You can find these roles here:
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 10:02 PM
Hi @_imuya
The ACL that you are talking about gives the Requires roles read access to the questions and responses for the assessment metrics which usually contains generic admin roles.
Additionally, if you want certain roles to have read access to the questionnaires, you need to add them to the assessment metric type record on the Roles list field.
eg for Vendor Satisfaction Assessment, which is OOB metric type gives read access to sn_vlm.vendor_manager role.
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 10:02 PM
Hi @_imuya,
On this particular ACL, the key is to look at the Script field.
(current.user == gs.getUserID()) || (new AssessmentUtils()).hasAssessmentRoles(current.metric_type.roles) || (new SNC.AssessmentCreation().isGuestUserTakingPublicSurvey(current.metric_type.sys_id, gs.getUserId()));
Look at the section where the hasAssessmentRoles method from the AssessmentUtils Script Include is being called. The parameter being passed to it is 'current.metric_type.roles'. Metric type is a reference field on the Assessment Instance table and it references the Assessment Metric Type table which, in turn, has a Roles field (look below).
This is where the list of roles is coming from.
Hope this answered your question.