Initial RESTObjects

This commit is contained in:
stephb9959
2021-10-27 22:08:50 -07:00
parent d0dcf043d1
commit 9abc70dc67
13 changed files with 544 additions and 70 deletions

View File

@@ -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;