mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Implemented _non recursive_ role specific grants for table/column level privileges
This commit is contained in:
committed by
Sergei Golubchik
parent
2060937353
commit
fe521dc28e
@ -5200,8 +5200,12 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
|
||||
if (!(sctx->master_access & SELECT_ACL))
|
||||
{
|
||||
if (db && (!thd->db || db_is_pattern || strcmp(db, thd->db)))
|
||||
{
|
||||
db_access= acl_get(sctx->host, sctx->ip, sctx->priv_user, db,
|
||||
db_is_pattern);
|
||||
if (sctx->priv_role)
|
||||
db_access|= acl_get("", "", sctx->priv_role, db, db_is_pattern);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* get access for current db */
|
||||
@ -5245,8 +5249,14 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
|
||||
}
|
||||
|
||||
if (db && (!thd->db || db_is_pattern || strcmp(db,thd->db)))
|
||||
{
|
||||
db_access= acl_get(sctx->host, sctx->ip, sctx->priv_user, db,
|
||||
db_is_pattern);
|
||||
if (sctx->priv_role)
|
||||
{
|
||||
db_access|= acl_get("", "", sctx->priv_role, db, db_is_pattern);
|
||||
}
|
||||
}
|
||||
else
|
||||
db_access= sctx->db_access;
|
||||
DBUG_PRINT("info",("db_access: %lu want_access: %lu",
|
||||
|
Reference in New Issue
Block a user