Skip to content

Commit

Permalink
Adding missing files for this to work
Browse files Browse the repository at this point in the history
  • Loading branch information
cniackz committed Dec 3, 2024
1 parent ccf1c39 commit c47cd53
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions api/admin_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,6 @@ func getAddPolicyResponse(session *models.Principal, params policyApi.AddPolicyP
if params.Body == nil {
return nil, ErrorWithContext(ctx, ErrPolicyBodyNotInRequest)
}
if strings.Contains(*params.Body.Name, " ") {
return nil, ErrorWithContext(ctx, ErrPolicyNameContainsSpace)
}
mAdmin, err := NewMinioAdminClient(params.HTTPRequest.Context(), session)
if err != nil {
return nil, ErrorWithContext(ctx, err)
Expand Down
5 changes: 0 additions & 5 deletions api/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ var (
ErrGroupNameNotInRequest = errors.New("error group name not in request")
ErrPolicyNameNotInRequest = errors.New("error policy name not in request")
ErrPolicyBodyNotInRequest = errors.New("error policy body not in request")
ErrPolicyNameContainsSpace = errors.New("error policy name cannot contain spaces")
ErrInvalidEncryptionAlgorithm = errors.New("error invalid encryption algorithm")
ErrSSENotConfigured = errors.New("error server side encryption configuration not found")
ErrBucketLifeCycleNotConfigured = errors.New("error bucket life cycle configuration not found")
Expand Down Expand Up @@ -161,10 +160,6 @@ func ErrorWithContext(ctx context.Context, err ...interface{}) *CodedAPIError {
errorCode = 400
errorMessage = ErrPolicyBodyNotInRequest.Error()
}
if errors.Is(err1, ErrPolicyNameContainsSpace) {
errorCode = 400
errorMessage = ErrPolicyNameContainsSpace.Error()
}
// console invalid session errors
if errors.Is(err1, ErrInvalidSession) {
errorCode = 401
Expand Down
1 change: 0 additions & 1 deletion web-app/src/screens/Console/Policies/AddPolicyScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ const AddPolicyScreen = () => {

const validSave =
policyName.trim() !== "" &&
policyName.indexOf(" ") === -1 &&
policyDefinition.trim() !== "";

useEffect(() => {
Expand Down

0 comments on commit c47cd53

Please sign in to comment.