Welcome, Guest
Username: Password: Remember me

TOPIC: How to implement table level ACL with jcook pro

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

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

Regards
Vivek
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
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
The administrator has disabled public write access.

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

  • vivek
  • vivek's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 2
  • Karma: 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
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
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 administrator has disabled public write access.
The following user(s) said Thank You: vivek
Time to create page: 0.076 seconds

Get Started