-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: New permission to kick users (#30535)
Co-authored-by: Guilherme Gazzo <[email protected]>
- Loading branch information
1 parent
bdc9d8c
commit a8718ed
Showing
8 changed files
with
96 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/meteor': patch | ||
--- | ||
|
||
Add new permission to allow kick users from rooms without being a member |
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,9 +1,11 @@ | ||
import { upsertPermissions } from '../../../app/authorization/server/functions/upsertPermissions'; | ||
import { migrateDatabase, onFreshInstall } from '../../lib/migrations'; | ||
import { migrateDatabase, onServerVersionChange } from '../../lib/migrations'; | ||
|
||
const { MIGRATION_VERSION = 'latest' } = process.env; | ||
|
||
const [version, ...subcommands] = MIGRATION_VERSION.split(','); | ||
|
||
await migrateDatabase(version === 'latest' ? version : parseInt(version), subcommands); | ||
await onFreshInstall(upsertPermissions); | ||
|
||
// if the server is starting with a different version we update the permissions | ||
await onServerVersionChange(() => upsertPermissions()); |
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