SlideShare a Scribd company logo
1 of 16
Introduction To Bare_Acl ,[object Object]
What Is Bare? ,[object Object]
Written to fill the gap created by libraries and frameworks
Keeping simplicity in mind
Currently has one component - Bare_Acl
What Is Acl? ,[object Object]
Who gets what?
RBAC – Role Based Access Control
Downloading Bare_Acl ,[object Object]
Using Bare_Acl ,[object Object]
Autoloading – plays well with Zend Framework and other popular PHP auto loaders
Roll your own autoloader
Acl Example - Privileges ,[object Object]
Publish articles
Edit articles
Delete articles

More Related Content

What's hot

5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
nicdev
 
Method based views in django applications
Method based views in django applicationsMethod based views in django applications
Method based views in django applications
Gary Reynolds
 
Filters in AngularJS
Filters in AngularJSFilters in AngularJS
Filters in AngularJS
Brajesh Yadav
 

What's hot (20)

5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
 
GAEO
GAEOGAEO
GAEO
 
AOP in Python API design
AOP in Python API designAOP in Python API design
AOP in Python API design
 
Angular Testing
Angular TestingAngular Testing
Angular Testing
 
JavaScript徹底整理セミナー "今から始める人も、整理したい人も"
JavaScript徹底整理セミナー "今から始める人も、整理したい人も"JavaScript徹底整理セミナー "今から始める人も、整理したい人も"
JavaScript徹底整理セミナー "今から始める人も、整理したい人も"
 
Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api's
 
Story ofcorespring infodeck
Story ofcorespring infodeckStory ofcorespring infodeck
Story ofcorespring infodeck
 
Creating custom aggregator
Creating custom aggregatorCreating custom aggregator
Creating custom aggregator
 
Get cfml Into the Box 2018
Get cfml Into the Box 2018Get cfml Into the Box 2018
Get cfml Into the Box 2018
 
Angular data binding by Soft Solutions4U
Angular data binding by Soft Solutions4UAngular data binding by Soft Solutions4U
Angular data binding by Soft Solutions4U
 
David Bilík: Anko – modern way to build your layouts?
David Bilík: Anko – modern way to build your layouts?David Bilík: Anko – modern way to build your layouts?
David Bilík: Anko – modern way to build your layouts?
 
Our First 60 Days of FME
Our First 60 Days of FMEOur First 60 Days of FME
Our First 60 Days of FME
 
Method based views in django applications
Method based views in django applicationsMethod based views in django applications
Method based views in django applications
 
Building an API with Django and Django REST Framework
Building an API with Django and Django REST FrameworkBuilding an API with Django and Django REST Framework
Building an API with Django and Django REST Framework
 
RxJS - The Basics & The Future
RxJS - The Basics & The FutureRxJS - The Basics & The Future
RxJS - The Basics & The Future
 
Filters in AngularJS
Filters in AngularJSFilters in AngularJS
Filters in AngularJS
 
Try using Aeromock by Marverick, Inc.
Try using Aeromock by Marverick, Inc.Try using Aeromock by Marverick, Inc.
Try using Aeromock by Marverick, Inc.
 
Using JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot apps
 
Symfony bundle fo asynchronous job processing
Symfony bundle fo asynchronous job processingSymfony bundle fo asynchronous job processing
Symfony bundle fo asynchronous job processing
 
Getting Started With Angular
Getting Started With AngularGetting Started With Angular
Getting Started With Angular
 

Viewers also liked

Introduction to-bizsense-bpug-29-05-2010
Introduction to-bizsense-bpug-29-05-2010Introduction to-bizsense-bpug-29-05-2010
Introduction to-bizsense-bpug-29-05-2010
Sudheer Satyanarayana
 

Viewers also liked (9)

Mysql Naming Conventions Bangalore Mysql User Group Oct 11 09
Mysql Naming Conventions Bangalore Mysql User Group Oct 11 09Mysql Naming Conventions Bangalore Mysql User Group Oct 11 09
Mysql Naming Conventions Bangalore Mysql User Group Oct 11 09
 
Framework Shootout ZF
Framework Shootout ZFFramework Shootout ZF
Framework Shootout ZF
 
Building Restful Applications Using Php
Building Restful Applications Using PhpBuilding Restful Applications Using Php
Building Restful Applications Using Php
 
Introduction to-bizsense-bpug-29-05-2010
Introduction to-bizsense-bpug-29-05-2010Introduction to-bizsense-bpug-29-05-2010
Introduction to-bizsense-bpug-29-05-2010
 
XML For PHP Developers
XML For PHP DevelopersXML For PHP Developers
XML For PHP Developers
 
How To Build A Bulk Email Sending Application In PHP
How To Build A Bulk Email Sending Application In PHPHow To Build A Bulk Email Sending Application In PHP
How To Build A Bulk Email Sending Application In PHP
 
Messages queues - Socloz@PHPForum 2013
Messages queues - Socloz@PHPForum 2013Messages queues - Socloz@PHPForum 2013
Messages queues - Socloz@PHPForum 2013
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Отчёт НАСА с результатами тестов EmDrive
Отчёт НАСА с результатами тестов EmDriveОтчёт НАСА с результатами тестов EmDrive
Отчёт НАСА с результатами тестов EmDrive
 

Similar to Bare acl

Similar to Bare acl (20)

Rails 101
Rails 101Rails 101
Rails 101
 
Content Driven Zend_Acl in the Model Layer
Content Driven Zend_Acl in the Model LayerContent Driven Zend_Acl in the Model Layer
Content Driven Zend_Acl in the Model Layer
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx
 
-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx
 
Getting Started with Rails
Getting Started with RailsGetting Started with Rails
Getting Started with Rails
 
k8s-on-azure
 k8s-on-azure k8s-on-azure
k8s-on-azure
 
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
 
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part OneAppcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
 
Automating Your Azure Environment
Automating Your Azure EnvironmentAutomating Your Azure Environment
Automating Your Azure Environment
 
Session-1.pptx
Session-1.pptxSession-1.pptx
Session-1.pptx
 
Caldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW WorkshopCaldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW Workshop
 
AWS Serverless Workshop
AWS Serverless WorkshopAWS Serverless Workshop
AWS Serverless Workshop
 
Building and Distributing PostgreSQL Extensions Without Learning C
Building and Distributing PostgreSQL Extensions Without Learning CBuilding and Distributing PostgreSQL Extensions Without Learning C
Building and Distributing PostgreSQL Extensions Without Learning C
 
Zen and the Art of Claroline Module Development
Zen and the Art of Claroline Module DevelopmentZen and the Art of Claroline Module Development
Zen and the Art of Claroline Module Development
 
PHP 8: What's New and Changed
PHP 8: What's New and ChangedPHP 8: What's New and Changed
PHP 8: What's New and Changed
 
Introduction à Ruby
Introduction à RubyIntroduction à Ruby
Introduction à Ruby
 
243329387 angular-docs
243329387 angular-docs243329387 angular-docs
243329387 angular-docs
 
Course CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.jsCourse CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.js
 
Compose Camp Session 1.pdf
Compose Camp Session 1.pdfCompose Camp Session 1.pdf
Compose Camp Session 1.pdf
 
Creating web api and consuming- part 1
Creating web api and consuming- part 1Creating web api and consuming- part 1
Creating web api and consuming- part 1
 

Bare acl

  • 1.
  • 2.
  • 3. Written to fill the gap created by libraries and frameworks
  • 5. Currently has one component - Bare_Acl
  • 6.
  • 8. RBAC – Role Based Access Control
  • 9.
  • 10.
  • 11. Autoloading – plays well with Zend Framework and other popular PHP auto loaders
  • 12. Roll your own autoloader
  • 13.
  • 17.
  • 19.
  • 20. Editor can create, publish, edit and delete articles
  • 21. Acl Example – Building Acl $acl = new Bare_Acl; $acl->addPrivilege('create articles'); $acl->addPrivilege('publish articles'); $acl->addPrivilege('edit articles'); $acl->addPrivilege('delete articles'); $acl->addRole('reporter'); $acl->addRole('editor');
  • 22. Acl Example – Building Acl $acl->allow('reporter', 'create articles'); $acl->allow('reporter', 'publish articles'); $acl->allow('editor', 'create articles'); $acl->allow('editor', 'publish articles'); $acl->allow('editor', 'edit articles'); $acl->allow('editor', 'delete articles');
  • 23. Acl Example – Querying Acl if ($acl->isAllowed(array('reporter'), 'create articles')) { echo PHP_EOL . " Reporter is allowed to create articles"; } if ($acl->isAllowed(array('reporter'), 'edit articles')) { echo PHP_EOL . " Reporter is allowed to edit articles"; } else { echo PHP_EOL . " Reporter is NOT allowed to edit articles"; } Reporter is allowed to create articles Reporter is NOT allowed to edit articles
  • 24.
  • 28. Acl Assertions – Creating The Assertion Object class ownArticleAssertion implements Bare_Acl_AssertInterface { public function assert(Bare_Acl $acl) { //Write code here to test if the user has access to edit this article return true; } }
  • 29. Acl Assertions – Querying The Acl $assertion = new ownArticleAssertion; if ($acl->isAllowed('reporter', null, $assertion)) { echo PHP_EOL . "Reporter has access to edit the article"; } else { echo PHP_EOL . "Reporter does NOT have access to edit the article"; }
  • 30.
  • 33. Thank You This work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 India License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/2.5/in/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.