One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
git_current_branch () { | |
local ref | |
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null) | |
local ret=$? | |
if [[ $ret != 0 ]] | |
then | |
[[ $ret == 128 ]] && return | |
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return | |
fi | |
echo ${ref#refs/heads/} |
import { AbilityBuilder, Ability } from 'casl' | |
// Alternatively this data can be retrieved from server | |
export default function defineAbilitiesFor(user) { | |
const { rules, can } = AbilityBuilder.extract() | |
can('read', 'User') | |
can('update', 'User', { id: user.id }) | |
if (user.role === 'doctor') { |