74
@sanderpotjer Joomla! 1.6 ACL Sander Potjer

Joomla 1.6 ACL - J and Beyond 2011 #jab11

Embed Size (px)

DESCRIPTION

Joomla 1.6 ACL explained by Sander Potjer during J and Beyond 2011. More info about ACL Manager for Joomla 1.6 on http://www.aclmanager.net

Citation preview

Page 1: Joomla 1.6 ACL - J and Beyond 2011 #jab11

@sanderpotjer

Joomla! 1.6 ACLSander Potjer

Page 2: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Sander Potjer• Co-founder of JoomlaCommunity.eu

• Organizer Joomla!Days Netherlands

• Organizer Joomla! User Groups in The Netherlands

• Company: Sander Potjer Webdesign

• Yireo/Jira ICT

• Student Architecture

Page 3: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Joomla! 1.6 ACL

Page 4: Joomla 1.6 ACL - J and Beyond 2011 #jab11

It took a while...

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

DrupalCon, October 2005Johan Janssens

Page 5: Joomla 1.6 ACL - J and Beyond 2011 #jab11

• ACL = Access Control List

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

• User actions on objects– e.g. create / edit / delete article

ACL?!

Page 6: Joomla 1.6 ACL - J and Beyond 2011 #jab11

• 7 fixed Groups– Public, Registered, Author, Editor,

Publisher, Manager, Administrator and Super-Administrator

– Hierarchical structure

• User can be assigned to one group

• Unlimited Groups– user-defined– not hierarchical

• User can be assigned to multiple groups

ACL in Joomla! 1.5 & 1.6 (Access)

Page 7: Joomla 1.6 ACL - J and Beyond 2011 #jab11

• 3 fixed Access Levels– Public, Registered and Special

• Fixed relation between Groups and Access Levels

• Unlimited Access Levels– user-defined

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

ACL in Joomla! 1.5 & 1.6 (Access)

Page 8: Joomla 1.6 ACL - J and Beyond 2011 #jab11

ACL in Joomla! 1.5 & 1.6 (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

• http://brian.teeman.net/joomla-gps/joomla-15-acl-explained.html

Page 10: Joomla 1.6 ACL - J and Beyond 2011 #jab11

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

admin access / etc.

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

• Permission inheritance not applicable

• User defined Actions per group

– Create / edit / delete / admin access / etc.

• Permission scope at multiple levels

– Site, Component, Category, Object

• Permission can be inherited

– from parent Groups and parent Categories

ACL in Joomla! 1.5 & 1.6 (Actions)

Page 11: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Joomla! 1.6 ACL Overview

Page 14: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Joomla 1.6 ACL: User• Guest is also a

user

• Users can be assigned to one or several groups

Page 16: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Joomla 1.6 ACL: Permissions• Assigned to group (not to a user!)

• 9 Actions– Site Login– Admin Login– Super Admin– Access Component– Create– Delete– Edit– Edit State– Edit Own

Page 18: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Joomla 1.6 ACL: Groups

• Users with same permissions

• User can be in multiple groups

• Inherit permissions from parent groups

• Unlimited (sub-)groups

• Keep it simple! Only use nested groups if needed

Page 20: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Joomla 1.6 ACL: Access Level

• Which group can view what (article, menu, module, etc.)

• Permissions are not inherited between Access Levels

• Even Super Users can not view content onfrontend

Page 22: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permissions

Page 23: Joomla 1.6 ACL - J and Beyond 2011 #jab11

How Permissions work

• 4 possible permission settings

– Not Set

– Inherited

– Allowed

– Denied

Page 24: Joomla 1.6 ACL - J and Beyond 2011 #jab11

How Permissions work• Not set

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

Page 25: Joomla 1.6 ACL - J and Beyond 2011 #jab11

How Permissions work• Inherited

– value from a parent permission level– value from a parent user group– can be overridden by ‘Allowed’ or ‘Denied’

Page 26: Joomla 1.6 ACL - J and Beyond 2011 #jab11

How Permissions work• Allowed

– action for current permission level and lower levels– action for current user group and child groups– can be overridden by ‘Denied’

Page 27: Joomla 1.6 ACL - J and Beyond 2011 #jab11

How Permissions work• Denied

– action for current permission level and lower levels– action for current user group and child groups– can’t be overridden at all– always win!

Page 28: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permission Hierarchy Levels

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

Page 29: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permissions: Global Configuration (Level 1)

Page 30: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permission Hierarchy Levels

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

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

Page 31: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permissions: Component Options (Level 2)

Page 32: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permissions: Component Options (Level 2)

Page 33: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permission Hierarchy Levels

• 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...)

Page 34: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permissions: Category (Level 3)

Page 35: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permissions: Category (Level 3)

Page 36: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permission Hierarchy Levels

• 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 articles in Joomla 1.6 core

Page 37: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permissions: Item (Level 4)

Page 38: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permissions: Item (Level 4)

Page 39: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permission Hierarchy Levels• 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 articles in Joomla 1.6 core

Page 40: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Permission Hierarchy Levels• 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 articles in Joomla 1.6 core

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

Page 41: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Inheriting example for ‘Create’ action

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

Level 1

Level 2

Level 3

Level 4

Page 42: Joomla 1.6 ACL - J and Beyond 2011 #jab11

• 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 43: Joomla 1.6 ACL - J and Beyond 2011 #jab11

• 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 44: Joomla 1.6 ACL - J and Beyond 2011 #jab11

• 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 45: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Available Permissions and Levelsfor a Group of Users

Page 46: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Action: Edit State

Page 47: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Many permission screens....

Page 48: Joomla 1.6 ACL - J and Beyond 2011 #jab11

ACL Manager for Joomla! 1.6

Page 49: Joomla 1.6 ACL - J and Beyond 2011 #jab11

ACL Manager for Joomla! 1.6

Page 50: Joomla 1.6 ACL - J and Beyond 2011 #jab11

ACL Managerfor Joomla! 1.6

Page 51: Joomla 1.6 ACL - J and Beyond 2011 #jab11

ACL Manager for Joomla! 1.6

Page 52: Joomla 1.6 ACL - J and Beyond 2011 #jab11

ACL Manager for Joomla! 1.6

Page 53: Joomla 1.6 ACL - J and Beyond 2011 #jab11

ACL Manager for Joomla! 1.6

www.aclmanager.net

Page 54: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Debug Permissions

Page 55: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Debug Permissions

• 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

Page 56: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Debug Permissions

Page 57: Joomla 1.6 ACL - J and Beyond 2011 #jab11

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

Debug Permissions

Page 58: Joomla 1.6 ACL - J and Beyond 2011 #jab11

So, what about the database?

Page 59: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Database: #__assets

Page 60: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Plan your ACL implementation

Page 61: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Describe the problem

• Most of the website is public available, specific content only for a group of users (e.g. teachers & students)

• A teacher can see content specifically for teachers, all student content and all public content

• Students can see content specifically for students and all public content

Page 62: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Viewing or action problem?

• 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

Page 63: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Think ahead! Maintenance?

• 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

Page 64: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Some Notes

Page 65: Joomla 1.6 ACL - J and Beyond 2011 #jab11

User in multiple groups

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

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

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

Page 66: Joomla 1.6 ACL - J and Beyond 2011 #jab11

What if I locked myself out? :-)

Page 67: Joomla 1.6 ACL - J and Beyond 2011 #jab11

What if I locked myself out? :-)• 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!

Page 68: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Practical ACL Tips

Page 69: Joomla 1.6 ACL - J and Beyond 2011 #jab11

ACL Tips

• Write down your ACL requirements for a website before implementing

• Joomla 1.5 User Groups are for backward compatibility in Joomla 1.6, 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)

Page 70: Joomla 1.6 ACL - J and Beyond 2011 #jab11

ACL Tips

• Assign User Group with backend access to a Viewing Access Level

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

• Idea: Make a Group for each Action so you can assign actions directly to a user

Page 71: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Joomla! ACL, what’s next?

Page 72: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Main suggestions

• View as action

• END user friendly interface

• Easy overview of your entire website

• Changes directly visible (no page reload)

• ...

Page 73: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Joomla! ACL:Good start, it is working but needs improvements for wide adoption by

the Joomla community

Page 74: Joomla 1.6 ACL - J and Beyond 2011 #jab11

Resources• http://www.yireo.com/tutorials/joomla/joomla-administration/402-joomla-16-

acls-1-marketing-group• 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