mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-11-01 11:17:51 +00:00
Adding additional security for SMS: only root, partner, admin are allowed to send SMS.
This commit is contained in:
@@ -33,6 +33,12 @@ namespace OpenWifi {
|
|||||||
return BadRequest("Code and number could not be validated");
|
return BadRequest("Code and number could not be validated");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( UserInfo_.userinfo.userRole!=SecurityObjects::ROOT &&
|
||||||
|
UserInfo_.userinfo.userRole!=SecurityObjects::PARTNER &&
|
||||||
|
UserInfo_.userinfo.userRole!=SecurityObjects::ADMIN) {
|
||||||
|
return UnAuthorized(RESTAPI::Errors::InsufficientAccessRights,ACCESS_DENIED);
|
||||||
|
}
|
||||||
|
|
||||||
if (Obj->has("to") &&
|
if (Obj->has("to") &&
|
||||||
Obj->has("text")) {
|
Obj->has("text")) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user