Skip to content

Commit

Permalink
compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
wh002 committed Mar 3, 2023
1 parent 289518d commit 46b9450
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/runtime/security/access_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
namespace dsn {
namespace security {
DSN_DEFINE_bool(security, enable_acl, false, "whether enable access controller or not");

DSN_DEFINE_bool(security, enable_ranger_acl, false, "whether enable access controller or not");

DSN_DEFINE_bool(security,
enable_ranger_acl,
false,
"whether enable access controller integrate to Apache Ranger or not");
DSN_DEFINE_string(security,
super_users,
"",
Expand All @@ -51,7 +52,6 @@ bool access_controller::pre_check(const std::string &user_name)
return true;
}
return false;
return _super_users.find(user_name) != _super_users.end();
}

bool access_controller::is_enable_ranger_acl() { return FLAGS_enable_ranger_acl; }
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/security/access_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ class access_controller
// app_name - tables involved in ACL
virtual bool allowed(message_ex *msg, const std::string &app_name) { return false; }

// (TODO:wanghao) : this method will be deleted in the next patch.
// TODO(wanghao): this method will be deleted in the next patch.
// check if the message received is allowd to do something.
// msg - the message received
virtual bool allowed(message_ex *msg) = 0;

protected:
// (TODO:wanghao) : this method will be deleted in the next patch.
// TODO(wanghao): this method will be deleted in the next patch.
bool pre_check(const std::string &user_name);

// Check if 'user_name' is the super user.
Expand Down

0 comments on commit 46b9450

Please sign in to comment.