Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

How to implement table level ACL with jcook pro 19 Oct 2014 07:51 #12705

  • vivek
  • vivek's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 123
  • Thank you received: 2
Hi,
How to implement table level ACL with JCook pro?

Regards
Vivek

Please Log in or Create an account to join the conversation.

How to implement table level ACL with jcook pro 20 Oct 2014 19:08 #12713

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Do you mean viewlevels ?
Use the "view acces" wizard

There is nothing more available for the moment.
Can you explain better the feature you are searching for ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

How to implement table level ACL with jcook pro 30 Oct 2014 08:44 #12719

  • vivek
  • vivek's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 123
  • Thank you received: 2
For example, there is a locations table.

I want users with specific access level to perform the create, update and another access level to delete the records.

Regards
Vivek

Please Log in or Create an account to join the conversation.

How to implement table level ACL with jcook pro 30 Oct 2014 17:14 #12721

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
First, add some acls in access.xml
ex: mytable.create, mytable.edit.own, ...

By default, ACL are global, but if you want to create for specific tables, then fork your concerned models (both item and list), by overriding the methods :
- canCreate()
- canEdit()
- canDelete()
...
Then, in those functions call other ACL you will have creted before (mytable.create, mytable.edit.own)

It is simple as that.
By default cook is not generating ll collection of ACL for every table, It would be too much.
A new feature would be to choose wich one to create, but even it become complex for nothing because it is really easy to realize.

Note, that the name of ACL can be what you like, so you can share ACL for several tables.

At the end, you can edit all those permissions in your component configuration (Options), the normal way...

Hope it helps you.
Coding is now a piece of cake
The following user(s) said Thank You: vivek

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.096 seconds

  I am so so so looking forward to see how far this can go. Seems like the skies the limit at the moment.
Kevin (Forum) 

Get Started