mirror of
https://github.com/Telecominfraproject/wlan-cloud-userportal.git
synced 2025-11-23 09:45:14 +00:00
Initial RESTObjects
This commit is contained in:
@@ -21,6 +21,14 @@ namespace OpenWifi {
|
||||
|
||||
static const std::list<const char *> PathName() { return std::list<const char *>{"/api/v1/internetConnection"}; };
|
||||
|
||||
inline bool RoleIsAuthorized(std::string & Reason) {
|
||||
if(UserInfo_.userinfo.userRole != SecurityObjects::USER_ROLE::SUBSCRIBER) {
|
||||
Reason = "User must be a subscriber";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void DoGet() final;
|
||||
void DoPost() final {};
|
||||
void DoPut() final;
|
||||
|
||||
Reference in New Issue
Block a user