Skip to content

Commit

Permalink
Fixed #7406: Regression - trusted role does not work with version 3.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPeshkoff committed Dec 2, 2022
1 parent 6dabf55 commit 825a39b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/dsql/StmtNodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8032,6 +8032,7 @@ void SetRoleNode::execute(thread_db* tdbb, dsql_req* request, jrd_tra** transact
user->usr_sql_role_name = roleName.c_str();
}

user->usr_flags |= USR_newrole;
if (SCL_admin_role(tdbb, user->usr_sql_role_name.c_str()))
user->usr_flags |= USR_dba;
else
Expand Down
2 changes: 2 additions & 0 deletions src/jrd/scl.epp
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,8 @@ void UserId::findGrantedRoles(thread_db* tdbb) const
}
END_FOR
}
else
usr_granted_role = usr_sql_role_name;

usr_flags &= ~USR_newrole;
}
Expand Down

0 comments on commit 825a39b

Please sign in to comment.