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

PDF
Python for AngularJS
KEY
I18n
PDF
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
PPTX
I Love codeigniter, You?
PPTX
RSpec and Rails
PDF
Crossing the Bridge: Connecting Rails and your Front-end Framework
PDF
Elasticsearch Internal - Shards
PPTX
AngularJS Unit Testing
Python for AngularJS
I18n
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
I Love codeigniter, You?
RSpec and Rails
Crossing the Bridge: Connecting Rails and your Front-end Framework
Elasticsearch Internal - Shards
AngularJS Unit Testing

What's hot (20)

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

Viewers also liked (9)

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

Similar to Bare acl (20)

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

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.