Giter VIP home page Giter VIP logo

roringbbk / acl_manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flexait/acl_manager

0.0 2.0 0.0 1.21 MB

An access control list (ACL), with respect to a computer file system, is a list of permissions attached to an object. An ACL specifies which users or system processes are granted access to objects, as well as what operations are allowed on given objects.[1] Each entry in a typical ACL specifies a subject and an operation. For instance, if a file object has an ACL that contains (Alice: read,write; Bob: read), this would give Alice permission to read and write the file and Bob to only read it.

License: MIT License

Ruby 75.80% JavaScript 1.62% CSS 5.07% HTML 17.51%

acl_manager's Introduction

AclManager

Code Climate

Installation

  1. Install the acl_manager gem: gem install 'acl_manager' or put it inside your Gemfile: gem 'acl_manager'

  2. Add the acl_manager module into devise inside your model: devise :database_authenticatable, :registerable, ..., :acl_manager

  3. Install the migrations. run: rails g acl_manager MODEL

  4. Open up your console and build the acls AclManager::Acl.build_all!

  5. Create your first role. eg: Admin

AclManager::Role.create(name: 'admin', active: true, description: 'gives users     admin access')
role = AclManager::Role.first
role.acls << AclManager::Acl.first
user = User.first
user.roles << role
  1. Add Acl Manager filter to your controllers
class ApplicationController < ActionController::Base
  before_filter :authenticate_user!, :authorizate_user!
  ...
end

Usage

Acl Manager Print Screen

Create a role list to user form

= f.collection_check_boxes :role_ids, AclManager::Role.all, :id, :name do |ff|
  = f.label
  = f.check_box

Translate role name

activerecord.attributes.acl_manager.role.#{role_name}

License

This project rocks and uses MIT-LICENSE.

acl_manager's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.