-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #818 from RocketChat/feature/292-roles
Create roles and permissions
- Loading branch information
Showing
74 changed files
with
572 additions
and
146 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
<template name="adminRoomInfo"> | ||
<div> | ||
<h3><a href="{{route}}"><i class="icon-{{type}}"></i> {{name}}</a></h3> | ||
</div> | ||
<div> | ||
<h3>{{_ "Users"}}:</h3> | ||
{{#each usernames}} | ||
{{.}}<br /> | ||
{{/each}} | ||
</div> | ||
<nav> | ||
<button class='button delete red'><span><i class='icon-trash'></i> {{_ "Delete"}}</span></button> | ||
</nav> | ||
{{#unless hasPermission 'view-room-administration'}} | ||
<p>You are not authorized to view this page.</p> | ||
{{else}} | ||
<div> | ||
<h3><a href="{{route}}"><i class="icon-{{type}}"></i> {{name}}</a></h3> | ||
</div> | ||
<div> | ||
<h3>{{_ "Users"}}:</h3> | ||
{{#each usernames}} | ||
{{.}}<br /> | ||
{{/each}} | ||
</div> | ||
{{#if canDeleteRoom}} | ||
<nav> | ||
<button class='button delete red'><span><i class='icon-trash'></i> {{_ "Delete"}}</span></button> | ||
</nav> | ||
{{/if}} | ||
{{/unless}} | ||
</template> |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
<template name="adminUserChannels"> | ||
<div class="user-info-channel"> | ||
<h3><a href="{{route}}"><i class="icon-{{type}}"></i> {{name}}</a></h3> | ||
</div> | ||
{{#unless hasPermission 'view-full-other-user-info'}} | ||
<p>You are not authorized to view this page.</p> | ||
{{else}} | ||
<div class="user-info-channel"> | ||
<h3><a href="{{route}}"><i class="icon-{{type}}"></i> {{name}}</a></h3> | ||
</div> | ||
{{/unless}} | ||
</template> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
<template name="adminUserEdit"> | ||
<div class="about clearfix"> | ||
<form class="edit-form"> | ||
<h3>{{name}}</h3> | ||
<div class="input-line"> | ||
<label for="name">{{_ "Name"}}</label> | ||
<input type="text" id="name" autocomplete="off" value="{{name}}"> | ||
</div> | ||
<div class="input-line"> | ||
<label for="username">{{_ "Username"}}</label> | ||
<input type="text" id="username" autocomplete="off" value="{{username}}"> | ||
</div> | ||
</form> | ||
</div> | ||
<nav> | ||
<button class='button button-block cancel secondary'><span>{{_ "Cancel"}}</span></button> | ||
<button class='button button-block blue save'><span>{{_ "Save"}}</span></button> | ||
</nav> | ||
{{#unless hasPermission 'edit-other-user-info'}} | ||
<p>You are not authorized to view this page.</p> | ||
{{else}} | ||
<div class="about clearfix"> | ||
<form class="edit-form"> | ||
<h3>{{name}}</h3> | ||
<div class="input-line"> | ||
<label for="name">{{_ "Name"}}</label> | ||
<input type="text" id="name" autocomplete="off" value="{{name}}"> | ||
</div> | ||
<div class="input-line"> | ||
<label for="username">{{_ "Username"}}</label> | ||
<input type="text" id="username" autocomplete="off" value="{{username}}"> | ||
</div> | ||
</form> | ||
</div> | ||
<nav> | ||
<button class='button button-block cancel secondary'><span>{{_ "Cancel"}}</span></button> | ||
<button class='button button-block blue save'><span>{{_ "Save"}}</span></button> | ||
</nav> | ||
{{/unless}} | ||
</template> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
<template name="adminUserInfo"> | ||
{{#if isAdmin}} | ||
{{> userInfo user=.}} | ||
<nav> | ||
<button class='button lightblue edit-user button-block'><span><i class='icon-edit'></i> {{_ "Edit"}}</span></button> | ||
{{#if admin}} | ||
{{> userInfo user=.}} | ||
<nav> | ||
{{#if hasPermission 'edit-other-user-info'}} | ||
<button class='button lightblue edit-user button-block'><span><i class='icon-edit'></i> {{_ "Edit"}}</span></button> | ||
{{/if}} | ||
{{#if hasPermission 'assign-admin-role'}} | ||
{{#if hasAdminRole}} | ||
<button class='button lightblue remove-admin button-block'><span><i class='icon-shield'></i> {{_ "Remove_Admin"}}</span></button> | ||
{{else}} | ||
<button class='button lightblue make-admin button-block'><span><i class='icon-shield'></i> {{_ "Make_Admin"}}</span></button> | ||
{{/if}} | ||
{{/if}} | ||
{{#if hasPermission 'edit-other-user-active-status'}} | ||
{{#if active}} | ||
<button class='button deactivate button-block'><span><i class='icon-block'></i> {{_ "Deactivate"}}</span></button> | ||
{{else}} | ||
<button class='button activate button-block'><span><i class='icon-ok-circled'></i> {{_ "Activate"}}</span></button> | ||
{{/if}} | ||
<button class='button delete red button-block'><span><i class='icon-trash'></i> {{_ "Delete"}}</span></button> | ||
</nav> | ||
{{/if}} | ||
{{/if}} | ||
{{#if hasPermission 'delete-user'}} | ||
<button class='button delete red button-block'><span><i class='icon-trash'></i> {{_ "Delete"}}</span></button> | ||
{{/if}} | ||
</nav> | ||
</template> |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.