This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(Yii::app()->user->isSuperuser) | |
| echo "I am one of the superuser of application, I have all access to app."; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var_dump(Yii::app()->getModule("rights")->getAuthorizer()->getSuperusers()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $roles=Rights::getAssignedRoles(Yii::app()->user->Id); | |
| foreach($roles as $role) | |
| echo $role->name."<br />"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $data_entry_users=Yii::app()->getAuthManager()->getAssignmentsByItemName('DataEntry'); | |
| $data_entry_users_id=array(); | |
| foreach($data_entry_users as $id=>$assignment) | |
| $data_entry_users_id[]=$id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(Yii::app()->user->isSuperuser) | |
| $type=$_POST['Type'];</div> | |
| else | |
| $type='User'; | |
| $authorizer = Yii::app()->getModule("rights")->getAuthorizer(); | |
| $authorizer->authManager->assign($type, $model->id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Host production | |
| Hostname production.example.com | |
| User ubuntu | |
| IdentityFile ~/secretlocation/example.pem | |
| Host staging | |
| Hostname staging.example | |
| User deploy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } | |
| source ~/.bashrc | |
| source ~/.scripts/.git-completion.bash | |
| #for adding branch to the terminal | |
| export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " |
OlderNewer