Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

DEV-8113 add options to hide CreatedAt and LastLogin fields; update build script #18

Merged
merged 2 commits into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
release:
types: [published]
pull_request:
branches: '**'
branches: 'develop'
push:
branches:
- develop
Expand Down
2 changes: 2 additions & 0 deletions app/authorization/server/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ Meteor.startup(function() {
{ _id: 'user-generate-access-token', roles: ['admin'] },
{ _id: 'view-d-room', roles: ['admin', 'user', 'bot', 'app', 'guest'] },
{ _id: 'view-full-other-user-info', roles: ['admin'] },
{ _id: 'view-full-other-user-info_last_login', roles: ['admin'] },
{ _id: 'view-full-other-user-info_created_at', roles: ['admin'] },
{ _id: 'view-history', roles: ['admin', 'user', 'anonymous'] },
{ _id: 'view-joined-room', roles: ['guest', 'bot', 'app', 'anonymous'] },
{ _id: 'view-join-code', roles: ['admin'] },
Expand Down
20 changes: 12 additions & 8 deletions app/ui-flextab/client/tabs/userInfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,18 @@ <h3 title="{{name}}" class="rc-user-info__name"><i class="status-{{status}}"></i
</div>
{{/if}}
{{#if createdAt}}
<div class="rc-user-info-details__item">
<label class="rc-user-info-details__label">{{_ "Created_at"}}</label>
<p class="rc-user-info-details__info">{{createdAt}}</p>
</div>
<div class="rc-user-info-details__item">
<label class="rc-user-info-details__label">{{_ "Last_login"}}</label>
<p class="rc-user-info-details__info">{{lastLogin}}</p>
</div>
{{#if hasPermission 'view-full-other-user-info_created_at'}}
<div class="rc-user-info-details__item">
<label class="rc-user-info-details__label">{{_ "Created_at"}}</label>
<p class="rc-user-info-details__info">{{createdAt}}</p>
</div>
{{/if}}
{{#if hasPermission 'view-full-other-user-info_last_login'}}
<div class="rc-user-info-details__item">
<label class="rc-user-info-details__label">{{_ "Last_login"}}</label>
<p class="rc-user-info-details__info">{{lastLogin}}</p>
</div>
{{/if}}
{{/if}}
{{#if shouldDisplayReason}}
<div class="rc-user-info-details__item">
Expand Down
2 changes: 2 additions & 0 deletions packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -3620,6 +3620,8 @@
"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_created_at": "View Created At field",
"view-full-other-user-info_last_login": "View Last Login field",
"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",
Expand Down