Joomla! ACL - Joomla!Day Germany

87
tekst Joomla! ACL Sander Potjer @sanderpotjer www.aclmanager.net Joomla!Day Germany - 5 October 2012

description

 

Transcript of Joomla! ACL - Joomla!Day Germany

Page 1: Joomla! ACL - Joomla!Day Germany

tekstJoomla! ACL

Sander Potjer@sanderpotjer

www.aclmanager.net

Joomla!Day Germany - 5 October 2012

Page 2: Joomla! ACL - Joomla!Day Germany

Sander Potjer• Involved in the local Joomla community

• Joomla Community Leadership Team (CLT) member

• Company: Sander Potjer Webdevelopment

• ACL Manager developer

• E-mail: [email protected]

Page 3: Joomla! ACL - Joomla!Day Germany

Sander Potjer• Involved in the local Joomla community

• Joomla Community Leadership Team (CLT) member

• Company: Sander Potjer Webdevelopment

• ACL Manager developer

• E-mail: [email protected]

• Slides: http://www.slideshare.net/sanderpotjer

Page 4: Joomla! ACL - Joomla!Day Germany

Joomla! ACL

Page 5: Joomla! ACL - Joomla!Day Germany

• http://www.slideshare.net/JohanJanssens/drupalcon-2005-joomla-drupal-and-you-presentation

DrupalCon, October 2005Johan Janssens

It took a while...

Page 6: Joomla! ACL - Joomla!Day Germany

• ACL = Access Control List

ACL?!?!

Page 7: Joomla! ACL - Joomla!Day Germany

• ACL = Access Control List

• Access to parts of the website– e.g. menu / module visibility– “view” action

ACL?!?!

Page 8: Joomla! ACL - Joomla!Day Germany

• ACL = Access Control List

• Access to parts of the website– e.g. menu / module visibility– “view” action

• User actions on objects– example: create / edit / edit state / delete article

ACL?!?!

Page 9: Joomla! ACL - Joomla!Day Germany

ACL - Groups

• 7 fixed Groups– Public, Registered, Author,

Editor, Publisher, Manager, Administrator and Super-Administrator

• Hierarchical structure

2.5/3.0

Page 10: Joomla! ACL - Joomla!Day Germany

ACL - Groups

• 7 fixed Groups– Public, Registered, Author,

Editor, Publisher, Manager, Administrator and Super-Administrator

• Hierarchical structure

• Unlimited Groups– user defined

• No Hierarchical Structure required

2.5/3.0

Page 11: Joomla! ACL - Joomla!Day Germany

ACL - User in Group

• User can be assigned to one group

2.5/3.0

Page 12: Joomla! ACL - Joomla!Day Germany

ACL - User in Group

• User can be assigned to one group

• User can be assigned to multiple groups

2.5/3.0

Page 13: Joomla! ACL - Joomla!Day Germany

ACL - Access Levels

• 3 fixed Access Levels– Public– Registered– Special

2.5/3.0

Page 14: Joomla! ACL - Joomla!Day Germany

ACL - Access Levels

• 3 fixed Access Levels– Public– Registered– Special

• Unlimited Access Levels– user defined

2.5/3.0

Page 15: Joomla! ACL - Joomla!Day Germany

ACL - Access Levels & Groups relation

• Fixed relation between Groups and Access Levels

2.5/3.0

Page 16: Joomla! ACL - Joomla!Day Germany

ACL - Access Levels & Groups relation

• Fixed relation between Groups and Access Levels

• Any combination of User Groups can be assigned to any Access Level

2.5/3.0

Page 17: Joomla! ACL - Joomla!Day Germany

ACL - Actions

• Fixed Actions per group– Create / edit / delete /

admin access / etc.

• Permission scope for entire site– Same permission for all objects

• Permission inheritance not applicable

2.5/3.0

Page 19: Joomla! ACL - Joomla!Day Germany

ACL - Actions

• Fixed Actions per group– Create / edit / delete /

admin access / etc.

• Permission scope for entire site– Same permission for all objects

• Permission inheritance not applicable

• Custom Actions per group– Create / edit / delete /

admin access / etc.

• Permission scope at multiple levels– Site/Component/Category/Item

• Permission can be inherited– Parent Groups / Categories

2.5/3.0

Page 20: Joomla! ACL - Joomla!Day Germany

Joomla! 2.5 ACL Overview

Page 23: Joomla! ACL - Joomla!Day Germany

• Guest is also a user

• Users can be assigned to one or multiple groups

User

Page 25: Joomla! ACL - Joomla!Day Germany

• Assigned to group (not to a user!)

• 10 Actions– Site Login– Admin Login– Offline Access (since 1.7)– Super Admin / Configure– Access Component– Create– Delete– Edit– Edit State– Edit Own

Permissions

Page 27: Joomla! ACL - Joomla!Day Germany

• Users with same permissions

• Inherited permissions from parent groups

• Unlimited nested groups

• Keep it simple! Only use nested groups if needed

• Guest group in Joomla 3.0

Group

Page 29: Joomla! ACL - Joomla!Day Germany

• What is visible for the group (article, menu, module, etc.)

• Permissions are not inherited between Access Levels

• Even Super Users can not view content on frontend ifnot assigned

Access Level

Page 31: Joomla! ACL - Joomla!Day Germany

Permissions

Page 32: Joomla! ACL - Joomla!Day Germany

• 4 possible permission settings

– Not Set

– Inherited

– Allowed

– Denied

Permissions

Page 33: Joomla! ACL - Joomla!Day Germany

• ‘soft’ deny• can be overridden by ‘Allowed’ or ‘Denied’

Permissions - Not Set

Page 34: Joomla! ACL - Joomla!Day Germany

• Value from a parent Permission level• Value from a parent User Group• Can be overridden by ‘Allowed’ or ‘Denied’

Permissions - Inherited

Page 35: Joomla! ACL - Joomla!Day Germany

• Action for current permission level and lower levels• Action for current user group and child groups• Can be overridden by ‘Denied’

Permissions - Allowed

Page 36: Joomla! ACL - Joomla!Day Germany

• Action for current Permission level and lower levels• Action for current User Group and child Groups• Can not be overridden at all• Always win!

Permissions - Denied

Page 37: Joomla! ACL - Joomla!Day Germany

• Level 1: Global configuration – default permissions settings for actions for a group

Permission Hierarchy (levels)

Page 38: Joomla! ACL - Joomla!Day Germany
Page 39: Joomla! ACL - Joomla!Day Germany

• Level 1: Global configuration – default permissions settings for actions for a group

• Level 2: Component Options – can override the permissions of Level 1

Permission Hierarchy (levels)

Page 40: Joomla! ACL - Joomla!Day Germany
Page 41: Joomla! ACL - Joomla!Day Germany
Page 42: Joomla! ACL - Joomla!Day Germany

• Level 1: Global configuration – default permissions settings for actions for a group

• Level 2: Component Options – can override the permissions of Level 1

• Level 3: Category – can override the permissions of Level 1 & Level 2– available for components with categories (Articles, Banners, etc...)

Permission Hierarchy (levels)

Page 43: Joomla! ACL - Joomla!Day Germany
Page 44: Joomla! ACL - Joomla!Day Germany
Page 45: Joomla! ACL - Joomla!Day Germany

• Level 1: Global configuration – default permissions settings for actions for a group

• Level 2: Component Options – can override the permissions of Level 1

• Level 3: Category – can override the permissions of Level 1 & Level 2– available for components with categories (Articles, Banners, etc...)

• Level 4: Item – can override the permissions of Level 1 & Level 2 & Level 3– only available for article manager in Joomla core

Permission Hierarchy (levels)

Page 46: Joomla! ACL - Joomla!Day Germany
Page 47: Joomla! ACL - Joomla!Day Germany
Page 48: Joomla! ACL - Joomla!Day Germany

• Level 1: Global configuration – default permissions settings for actions for a group

• Level 2: Component Options – can override the permissions of Level 1

• Level 3: Category – can override the permissions of Level 1 & Level 2– available for components with categories (Articles, Banners, etc...)

• Level 4: Item – can override the permissions of Level 1 & Level 2 & Level 3– only available for article manager in Joomla core

Permission Hierarchy (levels)

Page 49: Joomla! ACL - Joomla!Day Germany

• Level 1: Global configuration – default permissions settings for actions for a group

• Level 2: Component Options – can override the permissions of Level 1

• Level 3: Category – can override the permissions of Level 1 & Level 2– available for components with categories (Articles, Banners, etc...)

• Level 4: Item – can override the permissions of Level 1 & Level 2 & Level 3– only available for article manager in Joomla core

• Override permissions of higher levels only works if permission setting is not ‘Denied’!

Permission Hierarchy (levels)

Page 50: Joomla! ACL - Joomla!Day Germany

• http://www.theartofjoomla.com/home/5-commentary/84-introducing-the-new-permissions-in-joomla-16.html

Level 1

Level 2

Level 3

Level 4

Inheriting example for ‘Create’ Action

Page 51: Joomla! ACL - Joomla!Day Germany

• http://www.theartofjoomla.com/home/5-commentary/84-introducing-the-new-permissions-in-joomla-16.html

Level 1

Level 2

Level 3

Level 4

Inheriting example for ‘Create’ Action

Page 52: Joomla! ACL - Joomla!Day Germany

• http://www.theartofjoomla.com/home/5-commentary/84-introducing-the-new-permissions-in-joomla-16.html

Level 1

Level 2

Level 3

Level 4

Inheriting example for ‘Create’ Action

Page 53: Joomla! ACL - Joomla!Day Germany

• http://www.theartofjoomla.com/home/5-commentary/84-introducing-the-new-permissions-in-joomla-16.html

Level 1

Level 2

Level 3

Level 4

Inheriting example for ‘Create’ Action

Page 54: Joomla! ACL - Joomla!Day Germany

Available Permissions and Levelsfor a Group of Users

Page 55: Joomla! ACL - Joomla!Day Germany

Action: Edit State

Page 56: Joomla! ACL - Joomla!Day Germany
Page 57: Joomla! ACL - Joomla!Day Germany
Page 58: Joomla! ACL - Joomla!Day Germany
Page 59: Joomla! ACL - Joomla!Day Germany
Page 60: Joomla! ACL - Joomla!Day Germany

ACL Manager for Joomla! 1.6

Page 61: Joomla! ACL - Joomla!Day Germany

ACL Manager for Joomla! 1.6

Page 62: Joomla! ACL - Joomla!Day Germany
Page 63: Joomla! ACL - Joomla!Day Germany
Page 64: Joomla! ACL - Joomla!Day Germany
Page 65: Joomla! ACL - Joomla!Day Germany
Page 66: Joomla! ACL - Joomla!Day Germany
Page 67: Joomla! ACL - Joomla!Day Germany

ACL Manager for Joomla! 1.6

www.aclmanager.net/de

Page 68: Joomla! ACL - Joomla!Day Germany

Debug Permissions

Page 69: Joomla! ACL - Joomla!Day Germany

• Turn on the ‘Debug System’ in the Global Configuration

• Go to ‘User Manager’ or ‘Groups’

• Click on ‘Debug Permission Report’ next to the User or User Group

Debug Permissions

Page 70: Joomla! ACL - Joomla!Day Germany
Page 71: Joomla! ACL - Joomla!Day Germany

• Need to turn ‘Debug System’ on...Debug Permissions

Page 72: Joomla! ACL - Joomla!Day Germany

So, what about the database?

Page 73: Joomla! ACL - Joomla!Day Germany

Database: #__assets

Page 74: Joomla! ACL - Joomla!Day Germany

Plan your ACL implementation

Page 75: Joomla! ACL - Joomla!Day Germany

• Define the problem, is it a viewing problem or action problem (create/delete/edit/etc..)? Or both?

• Viewing: define the Viewing Access Levels

• Action: define the permissions for all actions

Viewing or Action problem

Page 76: Joomla! ACL - Joomla!Day Germany

• Structure your content properly to handle the permissions

• Make usage of parent categories with nested categories with same permissions

• No need to set permissions per article

Think ahead! Maintenance?

Page 77: Joomla! ACL - Joomla!Day Germany

Some Notes

Page 78: Joomla! ACL - Joomla!Day Germany

• The Netherlands– Allowed on edit ‘The Netherlands’ category– Denied on edit ‘Germany’ category

User in multiple User Groups

Page 79: Joomla! ACL - Joomla!Day Germany

• The Netherlands– Allowed on edit ‘The Netherlands’ category– Denied on edit ‘Germany’ category

• Germany– Allowed on edit ‘Germany’ category– Denied on edit ‘The Netherlands’ category

User in multiple User Groups

Page 80: Joomla! ACL - Joomla!Day Germany

• The Netherlands– Allowed on edit ‘The Netherlands’ category– Denied on edit ‘Germany’ category

• Germany– Allowed on edit ‘Germany’ category– Denied on edit ‘The Netherlands’ category

• User in The Netherlands & Germany group– Denied on edit ‘The Netherlands’ category– Denied on edit ‘Germany’ category– Denied always win (again)– Solution: don’t use denied but not set/inherited (=soft deny)

User in multiple User Groups

Page 81: Joomla! ACL - Joomla!Day Germany

What if I locked myself out?

Page 82: Joomla! ACL - Joomla!Day Germany

• No need to access your database• Open your configuration.php and add:

– public $root_user = 'username';

• You can login again and perform all actions• Great for playing around with the new ACL• Don’t forget to remove the $root_user line!

What if I locked myself out?

Page 83: Joomla! ACL - Joomla!Day Germany

Practical ACL Tips

Page 84: Joomla! ACL - Joomla!Day Germany

• Write down your ACL requirements for a website before implementing

• Joomla 1.5 User Groups are for backward compatibility in Joomla 2.5, you may remove them!

• Use multi-nested Groups only if needed / know what you are doing(so inheriting value only between levels, not groups as well)

ACL Tips

Page 85: Joomla! ACL - Joomla!Day Germany

• Assign User Group with backend access to a Viewing Access Level (often ‘Special’)

• Keep flexible for lower permission levels/groups: Avoid the ‘Denied’ permission setting as long as possible

• Use role-based groups

ACL Tips

Page 86: Joomla! ACL - Joomla!Day Germany

Quick ACL example(do we have time?)

Page 87: Joomla! ACL - Joomla!Day Germany

• http://community.joomla.org/blogs/community/1252-16-acl.html• http://docs.joomla.org/ACL_Tutorial_for_Joomla_1.6• http://docs.joomla.org/Access_Control_System_In_Joomla_1.6• http://www.theartofjoomla.com/home/5-commentary/84-introducing-the-new-

permissions-in-joomla-16.html• http://www.theartofjoomla.com/home/38-talks/101-the-joomla-16-video-

access-controls.html• http://www.aclmanager.net• http://www.aclmanager.net/news/general/28-is-your-extension-really-

joomla-17-ready• http://www.aclmanager.net/news/general/31-how-to-add-basic-acl-support-to-

your-extension• http://magazine.joomla.org/issues/issue-sept-2012/item/856-Implementing-

Role-Based-ACL

Resources