File tree Expand file tree Collapse file tree
apps/meteor/app/lib/server/methods Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { Meteor } from 'meteor/meteor';
77import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission' ;
88import { addUserToRole } from '../../../authorization/server/methods/addUserToRole' ;
99import { removeUserFromRole } from '../../../authorization/server/methods/removeUserFromRole' ;
10+ import { methodDeprecationLogger } from '../lib/deprecationWarningLogger' ;
1011
1112declare module '@rocket.chat/ddp-client' {
1213 // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -17,6 +18,8 @@ declare module '@rocket.chat/ddp-client' {
1718
1819Meteor . methods < ServerMethods > ( {
1920 async setAdminStatus ( userId , admin ) {
21+ methodDeprecationLogger . method ( 'setAdminStatus' , '8.0.0' , 'Use `/v1/roles.addUserToRole` or `/v1/roles.removeUserFromRole`.' ) ;
22+
2023 check ( userId , String ) ;
2124 check ( admin , Match . Optional ( Boolean ) ) ;
2225
You can’t perform that action at this time.
0 commit comments