The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/api/server/default/info.js

19 lines
390 B

import { hasRole } from '../../../authorization';
import { Info } from '../../../utils';
import { API } from '../api';
API.default.addRoute('info', { authRequired: false }, {
get() {
const user = this.getLoggedInUser();
if (user && hasRole(user._id, 'admin')) {
return API.v1.success({
info: Info,
});
}
return API.v1.success({
version: Info.version,
});
},
});