Hi,
With ref to #8533, I have an additional challenge. I have a row action that needs to be displayed only when two things are right
- The rights to perform the action and
- The correct status of the record
What I mean is, I have an action called 'Approve' and the entity has an Enum called 'Status' that has the following statuses 'Active, Draft, Cancelled, Expired'. So, a new record is created then it has the status 'Draft' and it hence needs to be approved to become 'Active' and to perform some background work. My challenge then is making sure that I check that the current user has rights to 'Approve' as well as check that the status is 'Draft' so as to display the row action.
Thanks in advance.
5 Answer(s)
-
0
You can check the permissions of the current user.
abp.auth.hasPermission('Approve')
-
0
Great. What of the status?
-
0
Hi,
Is your project Angular or JQuery ?
-
0
hi @alfar_re
You can check its
status
, just like https://support.aspnetzero.com/QA/Questions/8533visible: function (record) { return record.status === 'Draft'; }
-
0
Awesome. This was very helpful. Thank you.