<commit_before># Hybrid Acl

## Contents

- [Introduction](#introduction)
- [Methods](#methods)

<a name="introduction"></a>
## Introduction

The Acl class provides a standardized interface for authorization/priviledge in Fuel, using authentication from `Hybrid\Auth`.

### Examples

	Hybrid\Acl::register(function ($acl)
	{
		// add a single role
		$acl->add_role('subscriber');
		
		// add multiple roles
		$acl->add_roles(array('admin', 'manager', 'editor', 'contributor'));
		
		// add actions
		$acl->add_action('post content');
		
		// same with role, you can add multiple actions
		$acl->add_actions(array('manage all', 'view content', 'edit account', 'post comment', 'moderate content'));
		
		/* now lets start building our ACL */
		
		// any roles can view content (even guest)
		$acl->allow('*', 'view content'); 
		
		// any roles except guest can edit account
		$acl->allow('!guest', 'edit account'); 
		
		// only admin can manage all
		$acl->allow('admin', 'manage all'); 
		
		// any roles can post content
		$acl->allow('*', 'post content'); <commit_msg>changed 'Fuel' to 'Laravel'<commit_after># Hybrid Acl

## Contents

- [Introduction](#introduction)
- [Methods](#methods)

<a name="introduction"></a>
## Introduction

The Acl class provides a standardized interface for authorization/priviledge in Laravel, using authentication from `Hybrid\Auth`.

### Examples

	Hybrid\Acl::register(function ($acl)
	{
		// add a single role
		$acl->add_role('subscriber');
		
		// add multiple roles
		$acl->add_roles(array('admin', 'manager', 'editor', 'contributor'));
		
		// add actions
		$acl->add_action('post content');
		
		// same with role, you can add multiple actions
		$acl->add_actions(array('manage all', 'view content', 'edit account', 'post comment', 'moderate content'));
		
		/* now lets start building our ACL */
		
		// any roles can view content (even guest)
		$acl->allow('*', 'view content'); 
		
		// any roles except guest can edit account
		$acl->allow('!guest', 'edit account'); 
		
		// only admin can manage all
		$acl->allow('admin', 'manage all'); 
		
		// any roles can post content
		$acl->allow('*', 'post content'); 
{'fraction_non_alphanumeric': 0.16118573413617415, 'fraction_numerical': 0.0, 'mean_word_length': 3.8430493273542603, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6361482', 'n_tokens_mistral': 738, 'n_tokens_neox': 623, 'n_words': 209}