cortexrd / Knack-Toolkit-Library

Knack Toolkit Library
MIT License
26 stars 6 forks source link

Limit Bulk Edit to specific views #203

Closed MickGraham23 closed 9 months ago

MickGraham23 commented 9 months ago

I am using the KTL and want to allow Bulk Edit to someone but only on one of the pages they have access to.

It appears that if you have Bulk Edit Role, it is available on all pages?

Any advice appreciated Normand.

Regards Michael

CSWinnall commented 9 months ago

Hi Mick

As it stands at the moment, you would have to turn bulk edit off on all other views the user has access to, using _nbo keyword. Not ideal but a fix.

You could use code to remove the bulk ops element from every other view so the button is not available to edit the table.

If you need help with the code please let me know.

Craig

On Fri, 19 Jan 2024, 15:00 MickGraham23, @.***> wrote:

I am using the KTL and want to allow Bulk Edit to someone but only on one of the pages they have access to.

It appears that if you have Bulk Edit Role, it is available on all pages?

Any advice appreciated Normand.

Regards Michael

— Reply to this email directly, view it on GitHub https://github.com/cortexrd/Knack-Toolkit-Library/issues/203, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQQXA3DHD5LDDFJJY5FTU3YPKDAJAVCNFSM6AAAAABCCCSDXCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA4TANZTG4YDSMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MickGraham23 commented 9 months ago

Ah, I didn't notice _nboIt could be a temporary option.Thanks Craig.STRUCTURED SECURE WORKFLOW FOR SMART BUSINESSMelic Solutions Limitedhttps://www.melicsolutions.co.ukTel/WhatsApp: +447423520269On 19 Jan 2024 15:24, CSWinnall @.***> wrote: Hi Mick

As it stands at the moment, you would have to turn bulk edit off on all

other views the user has access to, using _nbo keyword. Not ideal but a

fix.

You could use code to remove the bulk ops element from every view so the

button is not available to edit the table.

If you need help with the code please let me know.

Craig

On Fri, 19 Jan 2024, 15:00 MickGraham23, @.***> wrote:

I am using the KTL and want to allow Bulk Edit to someone but only on one

of the pages they have access to.

It appears that if you have Bulk Edit Role, it is available on all pages?

Any advice appreciated Normand.

Regards

Michael

Reply to this email directly, view it on GitHub

https://github.com/cortexrd/Knack-Toolkit-Library/issues/203, or

unsubscribe

https://github.com/notifications/unsubscribe-auth/ACQQXA3DHD5LDDFJJY5FTU3YPKDAJAVCNFSM6AAAAABCCCSDXCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA4TANZTG4YDSMQ

.

You are receiving this because you are subscribed to this thread.Message

ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

cortexrd commented 9 months ago

Yes, the _nbo could be a temporary solution, but I didn't recommend it because I thought it would be too tedious.

I will create a new keyword: _ebo for Enable Bulk Ops that would force enabling specific operations.

Example: _ebo=edit, copy, delete

Would enable all of them. No parameters would do the same, or any combination, as desired. In such case, the bulk ops would be enabled, regardless of whether or not the user has the Bulk Op role(s).

If you combine this with a new User Role, you can then enable per user and per view.

Example: _ebo=[edit, delete], [ktlRoles, Bulk Ops Per View]

And assign the role "Bulk Ops Per View" to those users only. The role name can be anything you want, this one not being dictated by the KTL.

Norm

cortexrd commented 9 months ago

Hi @MickGraham23,

Good news! I've just released the KTL v0.22.13 that has the new keyword: _ebo (Enable Bulk Operations).

Use it like this:

_ebo=[edit], [ktlRoles, Bulk Per View] To enable Edit bulk ops, but only if the user has role BulkOps Per View

_ebo=[edit, copy], [ktlRoles, Bulk Per View] To enable Edit and Copy bulk ops, but only if the user has role BulkOps Per View

_ebo=ktlRoles, Bulk Per View To enable all bulk ops, but only if the user has role BulkOps Per View

Documentation will follow in a few days.

Enjoy, Norm

cortexrd commented 9 months ago

Officially released and documented. Let me know if you see anything. Norm