Don't allow public accesslist creation via API

This commit is contained in:
Cocoa 2023-08-20 01:56:43 +00:00 committed by momijizukamori
parent 8f824b84d7
commit f04e4bff33
4 changed files with 2 additions and 13 deletions

View File

@ -11,6 +11,3 @@ properties:
type: integer
minimum: 0
maximum: 255
is_public:
description: The visibility of the new accesslist. Default is false (private).
type: boolean

View File

@ -53,9 +53,6 @@ paths:
type: integer
minimum: 0
maximum: 255
is_public:
description: The visibility of the new accesslist. Default is false (private).
type: boolean
responses:
"200":
description: The id of the newly created accesslist.

View File

@ -10,7 +10,4 @@ properties:
description: Sort order for the new accesslist, 0 to 255.
type: integer
minimum: 0
maximum: 255
is_public:
description: The visibility of the new accesslist. Default is false (private).
type: boolean
maximum: 255

View File

@ -62,13 +62,11 @@ sub accesslists_new {
return $self->rest_error("403") unless $user == $remote;
my $body = $args->{body};
$body->{is_public} ||= 0; #default false
$body->{sortorder} ||= 0;
my $group = $user->create_trust_group(
groupname => $body->{name},
sortorder => $body->{sortorder},
is_public => $body->{is_public}
sortorder => $body->{sortorder}
);
return $self->rest_ok( { id => $group } );