SlideShare a Scribd company logo
Introduction To Bare_Acl Sudheer Satyanarayana Binary Vibes Information Technologies Pvt. Ltd. http://projects.binaryvibes.co.in/projects/show/bare http://binaryvibes.co.in http://techchorus.net
What Is Bare? Bare bones framework written by Bangaloreans
Written to fill the gap created by libraries and frameworks
Keeping simplicity in mind
Currently has one component - Bare_Acl
What Is Acl? Access Control List
Who gets what?
RBAC – Role Based Access Control
Downloading Bare_Acl http://binaryvibes.co.in/downloads/ Tar and Zip archives available
Using Bare_Acl Manually using require_once
Autoloading – plays well with Zend Framework and other popular PHP auto loaders
Roll your own autoloader
Acl Example - Privileges Create articles
Publish articles
Edit articles
Delete articles

More Related Content

What's hot (20)

5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
nicdev
 
GAEO
GAEOGAEO
GAEO
guest1d183d
 
AOP in Python API design
AOP in Python API designAOP in Python API design
AOP in Python API design
meij200
 
Angular Testing
Angular TestingAngular Testing
Angular Testing
Priscila Negreiros
 
JavaScript徹底整理セミナー "今から始める人も、整理したい人も"
JavaScript徹底整理セミナー "今から始める人も、整理したい人も"JavaScript徹底整理セミナー "今から始める人も、整理したい人も"
JavaScript徹底整理セミナー "今から始める人も、整理したい人も"
CASAREAL, Inc.
 
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
Ortus Solutions, Corp
 
Story ofcorespring infodeck
Story ofcorespring infodeckStory ofcorespring infodeck
Story ofcorespring infodeck
Makarand Bhatambarekar
 
Creating custom aggregator
Creating custom aggregatorCreating custom aggregator
Creating custom aggregator
Rahul Kumar
 
Get cfml Into the Box 2018
Get cfml Into the Box 2018Get cfml Into the Box 2018
Get cfml Into the Box 2018
Ortus Solutions, Corp
 
Angular data binding by Soft Solutions4U
Angular data binding by Soft Solutions4UAngular data binding by Soft Solutions4U
Angular data binding by Soft Solutions4U
sharsen
 
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?
mdevtalk
 
Our First 60 Days of FME
Our First 60 Days of FMEOur First 60 Days of FME
Our First 60 Days of FME
Safe Software
 
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
 
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
Christopher Foresman
 
RxJS - The Basics & The Future
RxJS - The Basics & The FutureRxJS - The Basics & The Future
RxJS - The Basics & The Future
Tracy Lee
 
Filters in AngularJS
Filters in AngularJSFilters in AngularJS
Filters in AngularJS
Brajesh Yadav
 
Try using Aeromock by Marverick, Inc.
Try using Aeromock by Marverick, Inc.Try using Aeromock by Marverick, Inc.
Try using Aeromock by Marverick, Inc.
scalaconfjp
 
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
Yakov Fain
 
Symfony bundle fo asynchronous job processing
Symfony bundle fo asynchronous job processingSymfony bundle fo asynchronous job processing
Symfony bundle fo asynchronous job processing
Wojciech Ciołko
 
Getting Started With Angular
Getting Started With AngularGetting Started With Angular
Getting Started With Angular
Stormpath
 
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
nicdev
 
AOP in Python API design
AOP in Python API designAOP in Python API design
AOP in Python API design
meij200
 
JavaScript徹底整理セミナー "今から始める人も、整理したい人も"
JavaScript徹底整理セミナー "今から始める人も、整理したい人も"JavaScript徹底整理セミナー "今から始める人も、整理したい人も"
JavaScript徹底整理セミナー "今から始める人も、整理したい人も"
CASAREAL, Inc.
 
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
Ortus Solutions, Corp
 
Creating custom aggregator
Creating custom aggregatorCreating custom aggregator
Creating custom aggregator
Rahul Kumar
 
Angular data binding by Soft Solutions4U
Angular data binding by Soft Solutions4UAngular data binding by Soft Solutions4U
Angular data binding by Soft Solutions4U
sharsen
 
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?
mdevtalk
 
Our First 60 Days of FME
Our First 60 Days of FMEOur First 60 Days of FME
Our First 60 Days of FME
Safe Software
 
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
 
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
Christopher Foresman
 
RxJS - The Basics & The Future
RxJS - The Basics & The FutureRxJS - The Basics & The Future
RxJS - The Basics & The Future
Tracy Lee
 
Filters in AngularJS
Filters in AngularJSFilters in AngularJS
Filters in AngularJS
Brajesh Yadav
 
Try using Aeromock by Marverick, Inc.
Try using Aeromock by Marverick, Inc.Try using Aeromock by Marverick, Inc.
Try using Aeromock by Marverick, Inc.
scalaconfjp
 
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
Yakov Fain
 
Symfony bundle fo asynchronous job processing
Symfony bundle fo asynchronous job processingSymfony bundle fo asynchronous job processing
Symfony bundle fo asynchronous job processing
Wojciech Ciołko
 
Getting Started With Angular
Getting Started With AngularGetting Started With Angular
Getting Started With Angular
Stormpath
 

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
Sudheer Satyanarayana
 
Framework Shootout ZF
Framework Shootout ZFFramework Shootout ZF
Framework Shootout ZF
Sudheer Satyanarayana
 
Building Restful Applications Using Php
Building Restful Applications Using PhpBuilding Restful Applications Using Php
Building Restful Applications Using Php
Sudheer Satyanarayana
 
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
 
XML For PHP Developers
XML For PHP DevelopersXML For PHP Developers
XML For PHP Developers
Sudheer Satyanarayana
 
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
Sudheer Satyanarayana
 
Messages queues - Socloz@PHPForum 2013
Messages queues - Socloz@PHPForum 2013Messages queues - Socloz@PHPForum 2013
Messages queues - Socloz@PHPForum 2013
Jean-Francois Bustarret
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
Luminary Labs
 
Отчёт НАСА с результатами тестов EmDrive
Отчёт НАСА с результатами тестов EmDriveОтчёт НАСА с результатами тестов EmDrive
Отчёт НАСА с результатами тестов EmDrive
Anatol Alizar
 
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
Sudheer Satyanarayana
 
Building Restful Applications Using Php
Building Restful Applications Using PhpBuilding Restful Applications Using Php
Building Restful Applications Using Php
Sudheer Satyanarayana
 
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
 
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
Sudheer Satyanarayana
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
Luminary Labs
 
Отчёт НАСА с результатами тестов EmDrive
Отчёт НАСА с результатами тестов EmDriveОтчёт НАСА с результатами тестов EmDrive
Отчёт НАСА с результатами тестов EmDrive
Anatol Alizar
 

Similar to Bare acl (20)

Rails 101
Rails 101Rails 101
Rails 101
The Active Network
 
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
Jeroen Keppens
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx
RishiGandhi19
 
-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx
IshwariKulkarni6
 
Getting Started with Rails
Getting Started with RailsGetting Started with Rails
Getting Started with Rails
Basayel Said
 
k8s-on-azure
 k8s-on-azure k8s-on-azure
k8s-on-azure
Ganesh Pol
 
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)
Cogapp
 
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
Aaron Saunders
 
Automating Your Azure Environment
Automating Your Azure EnvironmentAutomating Your Azure Environment
Automating Your Azure Environment
Michael Collier
 
Session-1.pptx
Session-1.pptxSession-1.pptx
Session-1.pptx
RamshaAshraf12
 
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
CalderaLearn
 
AWS Serverless Workshop
AWS Serverless WorkshopAWS Serverless Workshop
AWS Serverless Workshop
Mikael Puittinen
 
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
David Wheeler
 
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
Claroline
 
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
Ayesh Karunaratne
 
Introduction à Ruby
Introduction à RubyIntroduction à Ruby
Introduction à Ruby
Microsoft
 
243329387 angular-docs
243329387 angular-docs243329387 angular-docs
243329387 angular-docs
Abhi166803
 
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
Vinícius de Moraes
 
Compose Camp Session 1.pdf
Compose Camp Session 1.pdfCompose Camp Session 1.pdf
Compose Camp Session 1.pdf
AbhishekRajoraB20CS0
 
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
Dipendra Shekhawat
 
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
Jeroen Keppens
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx
RishiGandhi19
 
Getting Started with Rails
Getting Started with RailsGetting Started with Rails
Getting Started with Rails
Basayel Said
 
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)
Cogapp
 
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
Aaron Saunders
 
Automating Your Azure Environment
Automating Your Azure EnvironmentAutomating Your Azure Environment
Automating Your Azure Environment
Michael Collier
 
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
CalderaLearn
 
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
David Wheeler
 
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
Claroline
 
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
Ayesh Karunaratne
 
Introduction à Ruby
Introduction à RubyIntroduction à Ruby
Introduction à Ruby
Microsoft
 
243329387 angular-docs
243329387 angular-docs243329387 angular-docs
243329387 angular-docs
Abhi166803
 
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
Vinícius de Moraes
 
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
Dipendra Shekhawat
 

Bare acl

  • 1. Introduction To Bare_Acl Sudheer Satyanarayana Binary Vibes Information Technologies Pvt. Ltd. http://projects.binaryvibes.co.in/projects/show/bare http://binaryvibes.co.in http://techchorus.net
  • 2. What Is Bare? Bare bones framework written by Bangaloreans
  • 3. Written to fill the gap created by libraries and frameworks
  • 5. Currently has one component - Bare_Acl
  • 6. What Is Acl? Access Control List
  • 8. RBAC – Role Based Access Control
  • 10. Using Bare_Acl Manually using require_once
  • 11. Autoloading – plays well with Zend Framework and other popular PHP auto loaders
  • 12. Roll your own autoloader
  • 13. Acl Example - Privileges Create articles
  • 17. Acl Example - Roles editor
  • 19. Acl Example - Rules Reporter can create and publish articles
  • 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. Acl Assertions Assert = affirm, declare with assurance
  • 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. Contributions Are Welcome Liberal new BSD license
  • 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.