You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2020/04/28 02:21:20 UTC
[incubator-iotdb] branch master updated: Resolving spelling
mistakes in variable names in AuthUtils (#1110)
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new a1953fc Resolving spelling mistakes in variable names in AuthUtils (#1110)
a1953fc is described below
commit a1953fc274dacbdb3b1cac9af7de02ff6f081b86
Author: Mohammed sulthan <k....@yahoo.com>
AuthorDate: Tue Apr 28 07:51:09 2020 +0530
Resolving spelling mistakes in variable names in AuthUtils (#1110)
* -- Changing constant used in validatePassword method
* -- Changing spelling mistake in variable name in addPrivilege method
---
.../java/org/apache/iotdb/db/utils/AuthUtils.java | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java b/server/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java
index 6c34e8a..fa4997c 100644
--- a/server/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java
+++ b/server/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java
@@ -55,7 +55,7 @@ public class AuthUtils {
public static void validatePassword(String password) throws AuthException {
if (password.length() < MIN_PASSWORD_LENGTH) {
throw new AuthException(
- "Password's size must be greater than or equal to " + MIN_USERNAME_LENGTH);
+ "Password's size must be greater than or equal to " + MIN_PASSWORD_LENGTH);
}
}
@@ -260,14 +260,14 @@ public class AuthUtils {
* add privilege.
*
* @param path series path
- * @param privilgeId privilege Id
+ * @param privilegeId privilege Id
* @param privilegeList privileges in List structure
*/
- public static void addPrivilege(String path, int privilgeId, List<PathPrivilege> privilegeList) {
+ public static void addPrivilege(String path, int privilegeId, List<PathPrivilege> privilegeList) {
for (PathPrivilege pathPrivilege : privilegeList) {
if (pathPrivilege.getPath().equals(path)) {
- if (privilgeId != PrivilegeType.ALL.ordinal()) {
- pathPrivilege.getPrivileges().add(privilgeId);
+ if (privilegeId != PrivilegeType.ALL.ordinal()) {
+ pathPrivilege.getPrivileges().add(privilegeId);
} else {
for (PrivilegeType privilegeType : PrivilegeType.values()) {
pathPrivilege.getPrivileges().add(privilegeType.ordinal());
@@ -277,8 +277,8 @@ public class AuthUtils {
}
}
PathPrivilege pathPrivilege = new PathPrivilege(path);
- if (privilgeId != PrivilegeType.ALL.ordinal()) {
- pathPrivilege.getPrivileges().add(privilgeId);
+ if (privilegeId != PrivilegeType.ALL.ordinal()) {
+ pathPrivilege.getPrivileges().add(privilegeId);
} else {
for (PrivilegeType privilegeType : PrivilegeType.values()) {
pathPrivilege.getPrivileges().add(privilegeType.ordinal());
@@ -291,16 +291,16 @@ public class AuthUtils {
* remove privilege.
*
* @param path series path
- * @param privilgeId privilege Id
+ * @param privilegeId privilege Id
* @param privilegeList privileges in List structure
*/
- public static void removePrivilege(String path, int privilgeId,
+ public static void removePrivilege(String path, int privilegeId,
List<PathPrivilege> privilegeList) {
PathPrivilege emptyPrivilege = null;
for (PathPrivilege pathPrivilege : privilegeList) {
if (pathPrivilege.getPath().equals(path)) {
- if (privilgeId != PrivilegeType.ALL.ordinal()) {
- pathPrivilege.getPrivileges().remove(privilgeId);
+ if (privilegeId != PrivilegeType.ALL.ordinal()) {
+ pathPrivilege.getPrivileges().remove(privilegeId);
} else {
privilegeList.remove(pathPrivilege);
return;