From b14eba63c3366f01a5cda3122002857598919088 Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Tue, 18 Jan 2022 09:00:52 -0800 Subject: [PATCH] Removing owner constraint on subscriber. --- src/RESTAPI/RESTAPI_subuser_handler.cpp | 7 +------ src/framework/RESTAPI_errors.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/RESTAPI/RESTAPI_subuser_handler.cpp b/src/RESTAPI/RESTAPI_subuser_handler.cpp index 8e571bb..9823391 100644 --- a/src/RESTAPI/RESTAPI_subuser_handler.cpp +++ b/src/RESTAPI/RESTAPI_subuser_handler.cpp @@ -78,11 +78,6 @@ namespace OpenWifi { return BadRequest(RESTAPI::Errors::EntityMustExist); } -/* NewUser.owner = UserInfo_.userinfo.owner; - if(NewUser.owner.empty()) { - return BadRequest("Owner must be set for a subscriber."); - } -*/ if(!ACLProcessor::Can(UserInfo_.userinfo,NewUser,ACLProcessor::CREATE)) { return UnAuthorized(RESTAPI::Errors::InsufficientAccessRights, ACCESS_DENIED); } @@ -155,7 +150,7 @@ namespace OpenWifi { // The only valid things to change are: changePassword, name, AssignIfPresent(RawObject,"name", Existing.name); AssignIfPresent(RawObject,"description", Existing.description); - // AssignIfPresent(RawObject,"owner", Existing.owner); + AssignIfPresent(RawObject,"owner", Existing.owner); AssignIfPresent(RawObject,"location", Existing.location); AssignIfPresent(RawObject,"locale", Existing.locale); AssignIfPresent(RawObject,"changePassword", Existing.changePassword); diff --git a/src/framework/RESTAPI_errors.h b/src/framework/RESTAPI_errors.h index 061ba9a..c35f2fa 100644 --- a/src/framework/RESTAPI_errors.h +++ b/src/framework/RESTAPI_errors.h @@ -14,7 +14,7 @@ namespace OpenWifi::RESTAPI::Errors { static const std::string CouldNotBeDeleted{"Element could not be deleted."}; static const std::string NameMustBeSet{"The name property must be set."}; static const std::string ConfigBlockInvalid{"Configuration block type invalid."}; - static const std::string UnknownId{"Unknown management policy."}; + static const std::string UnknownId{"Unknown UUID."}; static const std::string InvalidDeviceTypes{"Unknown or invalid device type(s)."}; static const std::string RecordNotCreated{"Record could not be created."}; static const std::string RecordNotUpdated{"Record could not be updated."};