Read: Class 34 - 401-advanced-javascript-dania/amman-javascript-401d1 GitHub Wiki
and
- DEFINITION OF ROLE-BASED ACCESS CONTROL (RBAC)
Role-based access control (RBAC) restricts network access based on a person's role within an organization and has become one of the main methods for advanced access control. The roles in RBAC refer to the levels of access that employees have to the network.
Employees are only allowed to access the information necessary to effectively perform their job duties. Access can be based on several factors, such as authority, responsibility, and job competency. In addition, access to computer resources can be limited to specific tasks such as the ability to view, create, or modify a file.
As a result, lower-level employees usually do not have access to sensitive data if they do not need it to fulfill their responsibilities. This is especially helpful if you have many employees and use third-parties and contractors that make it difficult to closely monitor network access. Using RBAC will help in securing your company’s sensitive data and important applications.
Some of the designations in an RBAC tool can include:
- Management role scope – it limits what objects the role group is allowed to manage.
- Management role group – you can add and remove members.
- Management role – these are the types of tasks that can be performed by a specific role group.
- Management role assignment – this links a role to a role group.
**react-cookies **
Install $ npm install react-cookies --save
Usage import { Component } from 'react' import cookie from 'react-cookies'
import LoginPanel from './LoginPanel' import Dashboard from './Dashboard'
class MyApp extends Component { constructor () { super()
this.onLogin = this.onLogin.bind(this)
this.onLogout = this.onLogout.bind(this)
}
componentWillMount() { this.state = { userId: cookie.load('userId') } }
onLogin(userId) { this.setState({ userId }) cookie.save('userId', userId, { path: '/' }) }
onLogout() { cookie.remove('userId', { path: '/' }) }
render() { const { userId } = this.state
if (!userId) {
return <LoginPanel onSuccess={this.onLogin} />
}
return <Dashboard userId={userId} />
} }