Skip to content

Commit

Permalink
Merge pull request #7242 from RocketChat/real-permissions-names
Browse files Browse the repository at this point in the history
[NEW] Real permissions names and descriptions
  • Loading branch information
rodrigok committed Jun 30, 2017
2 parents e40379b + a5a3e27 commit ab6ceba
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
left: 50%;
transform: translateX(-50%);
}

.permission-name {
cursor: default;
}
}

.empty-role {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<tbody>
{{#each permission}}
<tr class="admin-table-row">
<td class="border-component-color">{{_id}}</td>
<td class="permission-name border-component-color" title="{{_ permissionDescription}}">{{_ permissionName}}<br>[{{_id}}]</td>
{{#each role}}
<td class="border-component-color">
<input type="checkbox" name="perm[{{_id}}][{{../_id}}]" class="role-permission" value="1" checked="{{granted ../roles}}" data-role="{{_id}}" data-permission="{{../_id}}">
Expand Down
8 changes: 8 additions & 0 deletions packages/rocketchat-authorization/client/views/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ Template.permissions.helpers({
}
},

permissionName() {
return `${ this._id }`;
},

permissionDescription() {
return `${ this._id }_description`;
},

hasPermission() {
return RocketChat.authz.hasAllPermission('access-permissions');
}
Expand Down
146 changes: 145 additions & 1 deletion packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,150 @@
"People": "People",
"Permalink": "Permalink",
"Permissions": "Permissions",
"access-mailer":"Access Mailer Screen",
"access-mailer_description":"Permission to send mass email to all users.",
"access-permissions":"Access Permissions Screen",
"access-permissions_description":"Modify permissions for various roles.",
"add-oauth-service":"Add Oauth Service",
"add-oauth-service_description":"Permission to add a new Oauth service",
"add-user":"Add User",
"add-user_description":"Permission to add new users to the server via users screen",
"add-user-to-any-c-room":"Add User to Any Public Channel",
"add-user-to-any-c-room_description":"Permission to add a user to any public channel",
"add-user-to-any-p-room":"Add User to Any Private Channel",
"add-user-to-any-p-room_description":"Permission to add a user to any private channel",
"add-user-to-joined-room":"Add User to Any Joined Channel",
"add-user-to-joined-room_description":"Permission to add a user to a currently joined channel",
"archive-room":"Archive Room",
"archive-room_description":"Permission to archive a channel",
"assign-admin-role":"Assign Admin Role",
"assign-admin-role_description":"Permission to assign the admin role to other users",
"auto-translate":"Auto Translate",
"auto-translate_description":"Permission to use the auto translate tool",
"ban-user":"Ban User",
"ban-user_description":"Permission to ban a user from a channel",
"bulk-create-c":"Bulk Create Channels",
"bulk-create-c_description":"Permission to create channels in bulk",
"bulk-register-user":"Bulk Create Channels",
"bulk-register-user_description":"Permission to create channels in bulk",
"clean-channel-history":"Clean Channel History",
"clean-channel-history_description":"Permission to Clear the history from channels",
"close-livechat-room":"Close Livechat Room",
"close-livechat-room_description":"Permission to close the current LiveChat channel",
"close-others-livechat-room":"Close Livechat Room",
"close-others-livechat-room_description":"Permission to close other LiveChat channels",
"create-c":"Create Public Channels",
"create-c_description":"Permission to create public channels",
"create-d":"Create Direct Messages",
"create-d_description":"Permission to start direct messages",
"create-p":"Create Private Channels",
"create-p_description":"Permission to create private channels",
"create-user":"Create User",
"create-user_description":"Permission to create users",
"delete-c":"Delete Public Channels",
"delete-c_description":"Permission to delete public channels",
"delete-d":"Delete Direct Messages",
"delete-d_description":"Permission to delete direct messages",
"delete-p":"Delete Private Channels",
"delete-p_description":"Permission to delete private channels",
"delete-message":"Delete Message",
"delete-message_description":"Permission to delete a message within a room",
"delete-user":"Delete User",
"delete-user_description":"Permission to delete users",
"edit-message":"Edit Message",
"edit-message_description":"Permission to edit a message within a room",
"edit-other-user-active-status":"Edit Other User Active Status",
"edit-other-user-active-status_description":"Permission to enable or disable other accounts",
"edit-other-user-info":"Edit Other User Information",
"edit-other-user-info_description":"Permission to change other user’s name, username or email address.",
"edit-other-user-password":"Edit Other User Password",
"edit-other-user-password_description":"Permission to modify other user’s passwords. Requires edit-other-user-info permission.",
"edit-privileged-setting":"Edit privileged Setting",
"edit-privileged-setting_description":"Permission to edit settings",
"edit-room":"Edit Room",
"edit-room_description":"Permission to edit a room’s name, topic, type (private or public status) and status (active or archived)",
"force-delete-message":"Force Delete Message",
"force-delete-message_description":"Permission to delete a message bypassing all restrictions",
"join-without-join-code":"Join Without Join Code",
"join-without-join-code_description":"Permission to bypass the join code in channels with join code enabled",
"mail-messages":"Mail Messages",
"mail-messages_description":"Permission to use the mail messages option",
"manage-assets":"Manage Assets",
"manage-assets_description":"Permission to manage the server assets",
"manage-emoji":"Manage Emoji",
"manage-emoji_description":"Permission to manage the server emojis",
"manage-integrations":"Manage Integrations",
"manage-integrations_description":"Permission to manage the server integrations",
"manage-oauth-apps":"Manage Oauth Apps",
"manage-oauth-apps_description":"Permission to manage the server Oauth apps",
"manage-own-integrations":"Manage Own Integrations",
"manage-own-integrations_description":"Permition to allow users to create and edit their own integration or webhooks",
"manage-sounds":"Manage Sounds",
"manage-sounds_description":"Permission to manage the server sounds",
"mention-all":"Mention All",
"mention-all_description":"Permission to use the @all mention",
"mute-user":"Mute User",
"mute-user_description":"Permission to mute other users in the same channel",
"pin-message":"Pin Message",
"pin-message_description":"Permission to pin a message in a channel",
"post-readonly":"Post ReadOnly",
"post-readonly_description":"Permission to post a message in a read-only channel",
"preview-c-room":"Preview Public Channel",
"preview-c-room_description":"Permission to view the contents of a public channel before joining",
"remove-user":"Remove User",
"remove-user_description":"Permission to remove a user from a room",
"run-import":"Run Import",
"run-import_description":"Permission to run the importers",
"run-migration":"Run Migration",
"run-migration_description":"Permission to run the migrations",
"save-others-livechat-room-info":"Save Others Livechat Room Info",
"save-others-livechat-room-info_description":"Permission to save information from other livechat channels",
"set-moderator":"Set Moderator",
"set-moderator_description":"Permission to set other users as moderator of a channel",
"set-owner":"Set Owner",
"set-owner_description":"Permission to set other users as owner of a channel",
"set-react-when-readonly":"Set React When ReadOnly",
"set-react-when-readonly_description":"Permission to set the ability to react to messages in a read only channel",
"set-readonly":"Set ReadOnly",
"set-readonly_description":"Permission to set a channel to read only channel",
"snippet-message":"Snippet Message",
"snippet-message_description":"Permission to create snippet message",
"unarchive-room":"Unarchive Room",
"unarchive-room_description":"Permission to unarchive channels",
"user-generate-access-token":"User Generate Access Token",
"user-generate-access-token_description":"Permission for users to generate access tokens",
"view-c-room":"View Public Channel",
"view-c-room_description":"Permission to view public channels",
"view-d-room":"View Direct Messages",
"view-d-room_description":"Permission to view direct messages",
"view-full-other-user-info":"View Full Other User Info",
"view-full-other-user-info_description":"Permission to view full profile of other users including account creation date, last login, etc.",
"view-history":"View History",
"view-history_description":"Permission to view the channel history",
"view-join-code":"View Join Code",
"view-join-code_description":"Permission to view the channel join code",
"view-joined-room":"View Joined Room",
"view-joined-room_description":"Permission to view the currently joined channels",
"view-l-room":"View Livechat Rooms",
"view-l-room_description":"Permission to view livechat channels",
"view-livechat-manager":"View Livechat Manager",
"view-livechat-manager_description":"Permission to view other livechat managers",
"view-livechat-rooms":"View Livechat Rooms",
"view-livechat-rooms_description":"Permission to view other livechat channels",
"view-logs":"View Logs",
"view-logs_description":"Permission to view the server logs ",
"view-p-room":"View Private Room",
"view-p-room_description":"Permission to view private channels",
"view-privileged-setting":"View Privileged Setting",
"view-privileged-setting_description":"Permission to view settings",
"view-other-user-channels":"View Other User Channels",
"view-other-user-channels_description":"Permission to view channels owned by other users",
"view-room-administration":"View Room Administration",
"view-room-administration_description":"Permission to view public, private and direct message statistics. Does not include the ability to view conversations or archives",
"view-statistics":"View Statistics",
"view-statistics_description":"Permission o view system statistics such as number of users logged in, number of rooms, operating system information",
"view-user-administration":"View User Administration",
"view-user-administration_description":"Permission to partial, read-only list view of other user accounts currently logged into the system. No user account information is accessible with this permission",
"Pin_Message": "Pin Message",
"Pinned_a_message": "Pinned a message:",
"Pinned_Messages": "Pinned Messages",
Expand Down Expand Up @@ -1733,4 +1877,4 @@
"your_message_optional": "your message (optional)",
"Your_password_is_wrong": "Your password is wrong!",
"Your_push_was_sent_to_s_devices": "Your push was sent to %s devices"
}
}

0 comments on commit ab6ceba

Please sign in to comment.