Skip to content

Commit 7d5ac47

Browse files
aniket414zeevmoney
andauthored
PermitContext - Corrected spelling (#32)
Co-authored-by: Zeev Manilovich <zeevmoney@users.noreply.github.com>
1 parent cf01937 commit 7d5ac47

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/io/permit/sdk/PermitContext.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class PermitContext {
3030
private ApiKeyLevel apiKeyLevel;
3131
private String permittedOrganization;
3232
private String permittedProject;
33-
private String permittedEnviroment;
33+
private String permittedEnvironment;
3434

3535
private ApiContextLevel contextLevel;
3636
private String org;
@@ -55,7 +55,7 @@ public PermitContext() {
5555
this.apiKeyLevel = ApiKeyLevel.WAIT_FOR_INIT;
5656
this.permittedOrganization = null;
5757
this.permittedProject = null;
58-
this.permittedEnviroment = null;
58+
this.permittedEnvironment = null;
5959

6060
// known context
6161
this.contextLevel = ApiContextLevel.WAIT_FOR_INIT;
@@ -70,15 +70,15 @@ private void saveApiKeyAccessibleScope(String org, String project, String enviro
7070

7171
if (project != null && environment != null) {
7272
permittedProject = project;
73-
permittedEnviroment = environment;
73+
permittedEnvironment = environment;
7474
apiKeyLevel = ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY;
7575
} else if (project != null) {
7676
permittedProject = project;
77-
permittedEnviroment = null;
77+
permittedEnvironment = null;
7878
apiKeyLevel = ApiKeyLevel.PROJECT_LEVEL_API_KEY;
7979
} else {
8080
permittedProject = null;
81-
permittedEnviroment = null;
81+
permittedEnvironment = null;
8282
apiKeyLevel = ApiKeyLevel.ORGANIZATION_LEVEL_API_KEY;
8383
}
8484
}
@@ -204,7 +204,7 @@ private void verifyCanAccessProject(String org, String project) throws PermitCon
204204

205205
private void verifyCanAccessEnvironment(String org, String project, String environment) throws PermitContextChangeError {
206206
verifyCanAccessProject(org, project);
207-
if (permittedEnviroment != null && !environment.equals(permittedEnviroment)) {
207+
if (permittedEnvironment != null && !environment.equals(permittedEnvironment)) {
208208
throw new PermitContextChangeError(
209209
"You cannot set an SDK context with environment '" + environment +
210210
"' due to insufficient API Key permissions"

0 commit comments

Comments
 (0)