fix(api): limit autoproxy member patch to own system
This commit is contained in:
parent
f0aa48f00a
commit
5c0472eb95
@ -57,7 +57,11 @@ public class AutoproxyControllerV2: PKControllerBase
|
|||||||
|
|
||||||
PKMember? member = null;
|
PKMember? member = null;
|
||||||
if (updateMember)
|
if (updateMember)
|
||||||
|
{
|
||||||
member = await ResolveMember(data.Value<string>("autoproxy_member"));
|
member = await ResolveMember(data.Value<string>("autoproxy_member"));
|
||||||
|
if (member != null && ContextFor(member) != LookupContext.ByOwner)
|
||||||
|
throw Errors.GenericMissingPermissions;
|
||||||
|
}
|
||||||
|
|
||||||
var patch = AutoproxyPatch.FromJson(data, member?.Id);
|
var patch = AutoproxyPatch.FromJson(data, member?.Id);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user