What is the "metric type's roles"?

_imuya
Tera Contributor

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

4 ACCEPTED SOLUTIONS

Anil Lande
Kilo Patron

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.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

You can find these roles here:

Screenshot 2023-11-28 at 11.28.27 AM.png

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

Aman Kumar S
Kilo Patron

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.

AmanKumarS_0-1701151316281.png

 

Best Regards
Aman Kumar

View solution in original post

Arpan Baishya
Kilo Sage

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).

ArpanBaishya_0-1701151313667.png


This is where the list of roles is coming from.

Hope this answered your question.



View solution in original post

4 REPLIES 4

Anil Lande
Kilo Patron

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.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

You can find these roles here:

Screenshot 2023-11-28 at 11.28.27 AM.png

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Aman Kumar S
Kilo Patron

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.

AmanKumarS_0-1701151316281.png

 

Best Regards
Aman Kumar

Arpan Baishya
Kilo Sage

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).

ArpanBaishya_0-1701151313667.png


This is where the list of roles is coming from.

Hope this answered your question.