Skip to content

Commit

Permalink
[FIX] Service Accounts bugs fixed (#68)
Browse files Browse the repository at this point in the history
* [NEW] Service Account Admin Settings and Configuration files added

* [NEW] Service Account Admin Settings and Configuration files added

* [NEW] Service Account Admin Settings and Configuration files added

* [NEW] Service Account Admin Settings and Configuration files added

* Service Account Creation dialog added

* [NEW] Service Account Creation method

* Service Account owner username update method added

* Fixed CLI errors

* Fixed CLI errors

* Service Account creation heading fixed

* Service Account broadcast room callback added

* Service Account creation method refactored

* Service Account Callback completed

* Typos fixed

* CLI errors fixed

* [NEW] Service Account one-tap login complete

* Callbacks modified

* Service Accounts directory tab added

* Refactored creation method and added tests

* CLI errors fixed

* CLI errors fixed

* Bugs fixed

* [NEW] Service Accounts Login method

* Typo fixed

* CLI errors fixed

* CLI errors fixed

* [New] Service Account directory feature

* CLI errors fixed

* UsernameExists meteor method fixed

* Sync commit

* [NEW] Service Account subscription method added

* [NEW] Service Account Broadcast Feature Added

* [NEW] Service Account Broadcast Feature Added

* [NEW] Service account subscription sidenav type

* Broadcast Room name change handled

* Lint errors fixed

* getLoginToken method refactored

* Console statements removed

* Sidebar header permission modified

* Merge branch service-accounts

* Added service account directory search translation key

* Subscribers count added

* [NEW] Service Account sidenav type

* Unread counter added in popver

* Get linked service account method added

* Partial rate limiter added

* Added unread counter

* Fixed CLI errors

* Broadcast feature added

* [FIX] Custom status displayed on room leader panel (RocketChat#14958)

* [FIX] LDAP login with customField sync (RocketChat#14808)

Closes RocketChat#14661

* [FIX] Prevent error on trying insert message with duplicated id (RocketChat#14945)

* [FIX] OTR key icon missing on messages (RocketChat#14953)

* [FIX] Method `getUsersOfRoom` not returning offline users if limit is not defined (RocketChat#14753)

* [IMPROVE] Remove too specific helpers isFirefox() and isChrome() (RocketChat#14963)

* [FIX] Jump to message missing in Starred Messages (RocketChat#14949)

* [IMPROVE] Update tabs markup (RocketChat#14964)

* [FIX] Loading indicator positioning (RocketChat#14968)

* Remove broken markup

* Recover lost class

* [FIX] load more messages (RocketChat#14967)

* [FIX] eternal loading file list (RocketChat#14952)

* [FIX] 50 custom emoji limit (RocketChat#14951)

* Bump jquery from 3.3.1 to 3.4.0 in /packages/rocketchat-livech… (RocketChat#14922)

Bumps [jquery](https://github.com/jquery/jquery) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/jquery/jquery/releases)
- [Commits](jquery/jquery@3.3.1...3.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

* [FIX] Allow storing the navigation history of unregistered Livechat visitors (RocketChat#14970)

* Remove validations before storing visitor navigation history.

* Removed unused imports.

* Update GPG key

* [FIX] Wrong label order on room settings (RocketChat#14960)

* [FIX] Chrome doesn't load additional search results when botto… (RocketChat#14965)

* fix scroll

* fix review

* ops

* [IMPROVEMENT] patch to improve emoji render (RocketChat#14722)

* path to improve emoji render

* Apply suggestions from code review

Co-Authored-By: Tasso Evangelista <tasso.evangelista@rocket.chat>

* Regression: patch to improve emoji render (RocketChat#14980)

This reverts commit b395b50.

* [FIX] Users staying online after logout (RocketChat#14966)

* Remove unused dependency (lokijs) (RocketChat#14973)

* Bump juice version to 5.2.0 (RocketChat#14974)

* Bump node-rsa version to 1.0.5 (RocketChat#14976)

* Bump photoswipe version to 4.1.3 (RocketChat#14977)

* Remove unused Meteor dependency (yasinuslu:blaze-meta) (RocketChat#14971)

* Bump marked from 0.5.2 to 0.6.1 (RocketChat#14969)

* Bump marked from 0.5.2 to 0.6.1

Bumps [marked](https://github.com/markedjs/marked) from 0.5.2 to 0.6.1.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Commits](markedjs/marked@v0.5.2...v0.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Update package-lock

* [IMPROVE] Federation routes RocketChat#14972

* [IMPROVE] Extract federation config to its own file (RocketChat#14992)

* Revert "[IMPROVE] Federation routes RocketChat#14972"

* Extract federation config logic to its own file

* Service account configurable approval process

* Improve Docker compose readability (RocketChat#14457)

* [FIX] Not being able to mention users with "all" and "here" usernames - do not allow users register that usernames (RocketChat#14468)

* [FIX] Custom User Status throttled by rate limiter (RocketChat#15001)

* [FIX] CustomOauth Identity Step errors displayed in HTML format (RocketChat#15000)

* Service account message alert added

* Lint errors fixed

* fixed browseChannels method

* fixed browseChannels method

* fixed browseChannels method

* fixed browseChannels method

* Service Account Notification fixed

* [IMPROVE] Add flag to identify remote federation users (RocketChat#15004)

* added isRemote flag to users

* set isRemote on peers collection
* moved some finds to its models
* use new raw model

* Add more indeces and model methods

* [FIX] Always displaying jumbomojis when using "marked" markdown (RocketChat#14861)

* relocate some of wizard info to register (RocketChat#14884)

* [NEW] Webdav File Picker (RocketChat#14879)

* [FIX] Invite users auto complete cropping results (RocketChat#15020)

* [FIX] Edit permissions screen (RocketChat#14950)

* fix layout still missing js

* Change publication to REST call

* Add default fields to exclude

* Use fixed fields

* Deprecate publication instead of removing it

* ui fix

* fix review

* Deprecate publication instead of removing it

* Prevent adding invalid users to role

* New: Apps and integrations statistics (RocketChat#14878)

* Add Apps and integrations infos to statistics

* Add stats for integrations with script enabled

* [FIX] Livechat dashboard average and reaction time labels (RocketChat#14845)

* [FIX] Edit message with arrow up key if not last message (RocketChat#15021)

* [IMPROVE] Connectivity Services License Sync (RocketChat#15022)

* Add workspace sync to cron job to keep license, access token, and marketplace key in sync

* Always convert the sha256 password to lowercase on checking (RocketChat#14941)

* Convert the sha256 pass to lowercase always

* Change password case on save user profile as well

* [FIX] SVG uploads crashing process (RocketChat#15006)

* Update package.json with newer sharp dependency

Shall Fix RocketChat#14944 
The underlying issue seems to be in sharp versions <0.22.x

* Update package-lock

* Fix statistics error for apps on first load (RocketChat#15026)

* [NEW] Setting to configure custom authn context on SAML requests (RocketChat#14675)

* [NEW] Accept multiple redirect URIs on OAuth Apps (RocketChat#14935)

* [NEW] Settings to further customize GitLab OAuth (RocketChat#15014)

Co-Authored-By: Hajo Möller <dasjoe@gmail.com>

* Add missing French translation (RocketChat#15013)

Add Message_AllowConvertLongMessagesToAttachment translation

* [FIX] users.setStatus REST endpoint not allowing reset status message (RocketChat#14916)

* [NEW] Options to filter discussion and livechat on Admin > Rooms (RocketChat#15019)

* [FIX] Typo in german translation (RocketChat#14833)

* Wrong text when reporting a message (RocketChat#14515)

* [FIX] Message attachments not allowing float numbers (RocketChat#14412)

* Fix russian grammatical errors in i18n (RocketChat#14622)

* [NEW] Deprecate MongoDB version 3.2 (RocketChat#15025)

* [NEW] Subscription enabled marketplace (RocketChat#14948)

* Show the subscription apps different from regular purchase prices

* Update app download calls return a Buffer directly

* Add X-Apps-Engine-Version header to marketplace requests

* Add getActiveUserCount method to apps-engine user bridge

* Add distinction  for purchase type on apps list

* Fix the issues with displaying subscriptions

* Remove external federated users from active user count

* Fix usage of federation module

* Change app installation to validate license

* Change the bridges to correctly query the workspace public key

* Change marketplaceUrl to marketplace-beta

* Update Apps and Marketplace styles (temp)

* Update price column on Marketplace

* Update status column on Marketplace

* Fix Marketplace app list update

* Remove log from client orchestrator

* Refactor server orchestrator

* Change rest api for license validation

* Add popover to Marketplace app list

* Add card (subscription) icon

* Update active user count method

* Update appManage template (partial)

* Update appManage template

* Add missing i18n strings

* Add cron routine to update apps info

* Add options parameter to new methods on model Users

* Revert testing settings

* Bump Apps-Engine version

* [NEW] Show helpful error when oplog is missing (RocketChat#14954)

* Show helpful error when oplog is missing

* Remove unused files

* Service Account bugs fixed

* Service Account bugs fixed

* Login bug fixed

* Lint errors fixed

* Logout callbacks added

* Service account logout fixed

* Lint errors fixed
  • Loading branch information
bhardwajaditya authored and Kailash0311 committed Jul 26, 2019
1 parent 58fb5f1 commit 803e79b
Show file tree
Hide file tree
Showing 96 changed files with 2,839 additions and 1,012 deletions.
2 changes: 1 addition & 1 deletion .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ rocketchat:i18n@0.0.1
rocketchat:livechat@0.0.1
rocketchat:mongo-config@0.0.1
rocketchat:monitoring@2.30.2_3
rocketchat:oauth2-server@2.0.0
rocketchat:oauth2-server@2.1.0
rocketchat:push@3.3.1
rocketchat:streamer@1.0.2
rocketchat:version@1.0.0
Expand Down
31 changes: 31 additions & 0 deletions app/api/server/v1/roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Match, check } from 'meteor/check';

import { Roles } from '../../../models';
import { API } from '../api';
import { getUsersInRole, hasPermission } from '../../../authorization/server';

API.v1.addRoute('roles.list', { authRequired: true }, {
get() {
Expand Down Expand Up @@ -55,3 +56,33 @@ API.v1.addRoute('roles.addUserToRole', { authRequired: true }, {
});
},
});

API.v1.addRoute('roles.getUsersInRole', { authRequired: true }, {
get() {
const { roomId, role } = this.queryParams;
const { offset, count = 50 } = this.getPaginationItems();

const fields = {
name: 1,
username: 1,
emails: 1,
};

if (!role) {
throw new Meteor.Error('error-param-not-provided', 'Query param "role" is required');
}
if (!hasPermission(this.userId, 'access-permissions')) {
throw new Meteor.Error('error-not-allowed', 'Not allowed');
}
if (roomId && !hasPermission(this.userId, 'view-other-user-channels')) {
throw new Meteor.Error('error-not-allowed', 'Not allowed');
}
const users = getUsersInRole(role, roomId, {
limit: count,
sort: { username: 1 },
skip: offset,
fields,
}).fetch();
return API.v1.success({ users });
},
});
2 changes: 1 addition & 1 deletion app/api/server/v1/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ API.v1.addRoute('users.setStatus', { authRequired: true }, {
}

Meteor.runAsUser(user._id, () => {
if (this.bodyParams.message) {
if (this.bodyParams.message || this.bodyParams.message.length === 0) {
setStatusText(user._id, this.bodyParams.message);
}
if (this.bodyParams.status) {
Expand Down
51 changes: 51 additions & 0 deletions app/apps/assets/stylesheets/apps.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.rc-apps-section,
.rc-apps-marketplace {
display: flex;

Expand Down Expand Up @@ -300,6 +301,12 @@

height: 100vh;

margin-top: 20px;

& .rc-form-filters {
margin: 8px 0;
}

& .js-sort {
cursor: pointer;

Expand All @@ -321,6 +328,50 @@
font-size: 1rem;
}
}

& tbody .rc-table-tr:not(.table-no-click):not(.table-no-pointer):hover {
background-color: #f7f8fa;
}

& .rc-table-info {
margin: 0;
justify-content: center;

& .rc-table-title,
& .rc-table-subtitle {
font-size: 0.875rem;
line-height: 1.25rem;
}

& .rc-apps-categories {
display: flex;

height: 1.25rem;
margin: 0 -0.25rem;
align-items: center;
flex-wrap: wrap;

& .rc-apps-category {
overflow: hidden;
flex: 0 0 auto;

box-sizing: border-box;
margin: 0.125rem 0.25rem;
padding: 0.0625rem 0.25rem;

text-transform: none;
text-overflow: ellipsis;

color: #9da1a8;
border-radius: 9999px;
background-color: #eef0f3;

font-size: 0.625rem;
font-weight: 500;
line-height: 0.875rem;
}
}
}
}

@media (width <= 700px) {
Expand Down
147 changes: 147 additions & 0 deletions app/apps/client/admin/appManage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
#rocket-chat .content .rc-apps-details {
&__content {
justify-content: flex-start;
}

&__app-name {
flex: 0 0 1.75rem;

margin: 0;

letter-spacing: 0;
text-transform: none;

color: rgb(84, 88, 94);

font-family: inherit;
font-size: 1.375rem;
font-weight: normal;
line-height: 1.75rem;
}

&__app-info {
display: flex;
flex: 0 0 1.25rem;
flex-wrap: nowrap;

> span::after {
display: inline-block;

width: 1px;
height: 12px;
margin: 0 8px;

content: '';

background: rgb(203, 206, 209);
}

> span:last-child::after {
display: none;

content: none;
}
}

&__app-author {
letter-spacing: -0.2px;

color: rgb(158, 162, 168);

font-family: inherit;
font-size: 14px;
font-weight: 500;
line-height: 20px;
}

&__app-version {
letter-spacing: -0.2px;

color: rgb(158, 162, 168);

font-family: inherit;
font-size: 14px;
font-weight: normal;
line-height: 20px;
}

&__app-status {
display: flex;
flex: 1;

margin-top: 8px;
align-items: center;
}

&__app-install-status {
display: flex;

height: 40px;

letter-spacing: 0;

color: rgb(158, 162, 168);

font-family: inherit;
font-size: 14px;
font-weight: 500;
align-items: center;
flex-wrap: nowrap;

& > .rc-icon {
color: var(--rc-color-button-primary);
}
}

&__app-price {
letter-spacing: -0.2px;

color: rgb(157, 161, 168);

font-family: inherit;
font-size: 14px;
font-weight: normal;
line-height: 20px;

&::before {
display: inline-block;

width: 1px;
height: 12px;
margin: 0 16px;

content: '';

background: rgb(203, 206, 209);
}
}

&__app-button-wrapper {
flex: 1;
}

& .rc-button.loading {
padding: 0 1.5rem;

opacity: 0.6;

&::before {
display: none;
}

& > .rc-icon {
animation: spin 1s linear infinite;
}
}

&__app-menu-trigger {
padding: 0;

&::before {
display: inline-block;
flex: 1;

content: '';
}
}
}
Loading

0 comments on commit 803e79b

Please sign in to comment.