-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
183 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright 2018-2019 CERN | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// In applying this license, CERN does not waive the privileges and immunities | ||
// granted to it by virtue of its status as an Intergovernmental Organization | ||
// or submit itself to any jurisdiction. | ||
|
||
syntax = "proto3"; | ||
|
||
package cs3.auth.provider.v1beta1; | ||
|
||
option csharp_namespace = "Cs3.Auth.Provider.V1Beta1"; | ||
option go_package = "providerv1beta1"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "ResourcesProto"; | ||
option java_package = "com.cs3.auth.provider.v1beta1"; | ||
option objc_class_prefix = "CAP"; | ||
option php_namespace = "Cs3\\Auth\\Provider\\V1Beta1"; | ||
|
||
// Scope defines role-based permissions for various paths. | ||
message Scope { | ||
// REQUIRED. | ||
// The path to which a scope applies. | ||
string path = 1; | ||
// REQUIRED. | ||
// The role associated with a particular path. | ||
Role role = 2; | ||
} | ||
|
||
// The role associated with the scope. | ||
enum Role { | ||
// Used for invalid roles | ||
ROLE_INVALID = 0; | ||
// Provides backwards compatibility | ||
ROLE_LEGACY = 1; | ||
// Grants non-editor role on a resource | ||
ROLE_VIEWER = 2; | ||
// Grants editor permission on a resource, including folders | ||
ROLE_EDITOR = 3; | ||
// Grants editor permission on a single file | ||
ROLE_FILE_EDITOR = 4; | ||
// Grants owner permissions on a resource | ||
ROLE_COOWNER = 5; | ||
// Role with only write permission can use InitiateFileUpload, nothing else | ||
ROLE_UPLOADER = 6; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters