GithubHelp home page GithubHelp logo

firoz-ahmad-likhon / codeigniter-role-base-access-control Goto Github PK

View Code? Open in Web Editor NEW
70.0 13.0 42.0 13 KB

CodeIgniter Role Base Access Control library is an easy understandable, comprehensive and convenient way to manage users.

License: MIT License

PHP 99.68% HTML 0.32%
codeigniter rbac role-based-access-control php

codeigniter-role-base-access-control's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codeigniter-role-base-access-control's Issues

Undefined properties

I added the ( "$this->load->library('auth');$this->auth->route_access();" ) to my dashboard controller in hopes to make people login and authenticate before being able to access the dashboard.

load->library('auth'); $this->auth->route_access(); } public function index() { $this->load->view("admin/dashboard_view"); } } However, I keep getting this error: Severity: Warning Message: Undefined property: Dashboard::$db Filename: libraries/Auth.php Line Number: 292 Backtrace: File: C:\xampp\htdocs\E_Motion\application\libraries\Auth.php Line: 292 Function: _error_handler File: C:\xampp\htdocs\E_Motion\application\libraries\Auth.php Line: 429 Function: userPermissions File: C:\xampp\htdocs\E_Motion\application\libraries\Auth.php Line: 413 Function: checkPermission File: C:\xampp\htdocs\E_Motion\application\libraries\Auth.php Line: 352 Function: can File: C:\xampp\htdocs\E_Motion\application\controllers\admin\Dashboard.php Line: 10 Function: route_access File: C:\xampp\htdocs\E_Motion\index.php Line: 315 Function: require_once

Readme error

Readme says to use hasRoles() - the function is hasRole().

How to access the login page ?

I have followed all the steps given in the read me till run the .SQL file and how you explore the project but what is login route how do I login into the system ?

I am getting this error

Call to undefined method CI_session::has_userdata()

How do i get LoggedIn username ?

Hi,

I want to show at the top of my Dashboard loggedIn User name.

How do i get ? Anything possible same like Check() method ?

using Route name is not Working

Hi,

I worked user role and permission there is a problem in route access. When i am using routing this route_access is not working. Is there any way to access using route name. Because I am using route name. Please help me.

Sample: $route['role/add'] = 'admin/add_role';

Thanks

change database

Hi this is a great user system, I am trying to implement a system when the users are on one database and when the user logs in the part of the information will be where the rest of the data is stored

//something like this
protected function setUser()
{
$account = $this->CI->db->get_where("accounts", array("id" => $this->user->account_id))->row(0);
$_SESSION['db_name'] = $account;
var_dump($_SESSION['db_name']);

    die();

.....................
return true;
}

the var_dump give this

object(stdClass)#27 (6) { ["id"]=> string(1) "1" ["company"]=> string(10) "management" ["database"]=> string(21) "management_qpuv0o2y3r" ["user_limit"]=> string(1) "1" ["created_at"]=> NULL ["updated_at"]=> NULL }

User permissions without role

Hi,

I found your library very use full,

Is their any way to assign permissions directly to user without assigning role.

Thanks

why $this->auth->permissions() always return NULL?

I want to check the current user list of permissions but it always return null.

My code
`
/*
// $this->load->model('role','role');
// $this->load->model('user','user');
//$this->user->addRoles(1, [2, 3]);
//$this->role->addPermissions(1, [6]);
echo "can: \n";
var_dump(can('permissions-users')); #return true;
echo "Permissions : \n";
var_dump($this->auth->permissions()); #return null;
echo "userPermissions : \n";
var_dump($this->auth->userPermissions()); #return array of permissions;

output

can : bool(true)
Permissoins: NULL
userPermissions : array(7) {
[0]=>
string(23) "settings-administration"
[1]=>
string(20) "index-administration"
[2]=>
string(15) "index-dashboard"
[3]=>
string(11) "roles-users"
[4]=>
string(17) "permissions-users"
[5]=>
string(10) "edit-users"
[6]=>
string(9) "add-users"
}
*/
`

request on using

I'm a newbie so can you make a small / quick video tutoring how to use this !

$this->auth->except(['add-posts']) it is not working

$this->auth->except(['add-posts']) this line i added in the controller under construct method but not working
please check below my code

parent::__construct();
$this->load->model('UserModel');
$this->load->library(['form_validation','session','auth','email']);
$this->load->helper(['form','email']);
$this->auth->except('getCompanyList');
$this->auth->route_access();

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.