forked from opensearch-project/security
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Directly store permissions in the cache
Signed-off-by: Derek Ho <[email protected]>
- Loading branch information
Showing
8 changed files
with
106 additions
and
132 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
40 changes: 40 additions & 0 deletions
40
src/main/java/org/opensearch/security/action/apitokens/Permissions.java
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,40 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.security.action.apitokens; | ||
|
||
import java.util.List; | ||
|
||
public class Permissions { | ||
private List<String> clusterPerm; | ||
private List<ApiToken.IndexPermission> indexPermission; | ||
|
||
// Constructor | ||
public Permissions(List<String> clusterPerm, List<ApiToken.IndexPermission> indexPermission) { | ||
this.clusterPerm = clusterPerm; | ||
this.indexPermission = indexPermission; | ||
} | ||
|
||
// Getters and setters | ||
public List<String> getClusterPerm() { | ||
return clusterPerm; | ||
} | ||
|
||
public void setClusterPerm(List<String> clusterPerm) { | ||
this.clusterPerm = clusterPerm; | ||
} | ||
|
||
public List<ApiToken.IndexPermission> getIndexPermission() { | ||
return indexPermission; | ||
} | ||
|
||
public void setIndexPermission(List<ApiToken.IndexPermission> indexPermission) { | ||
this.indexPermission = indexPermission; | ||
} | ||
|
||
} |
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
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
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
Oops, something went wrong.