Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
2f5eac0b
Commit
2f5eac0b
authored
6 years ago
by
apoorvnaik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2815: Restoring the deleted access verification calls
Change-Id: I1219fa682f631d43d16cbbe9a49f375ca4ba26f5 Signed-off-by:
apoorvnaik
<
apoorvnaik@apache.org
>
parent
42d801f7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
AtlasEntityStoreV2.java
...e/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
+14
-0
No files found.
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
View file @
2f5eac0b
...
...
@@ -119,6 +119,8 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
throw
new
AtlasBaseException
(
AtlasErrorCode
.
INSTANCE_GUID_NOT_FOUND
,
guid
);
}
AtlasAuthorizationUtils
.
verifyAccess
(
new
AtlasEntityAccessRequest
(
typeRegistry
,
AtlasPrivilege
.
ENTITY_READ
,
new
AtlasEntityHeader
(
ret
.
getEntity
())),
"read entity: guid="
,
guid
);
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== getById({}, {}): {}"
,
guid
,
isMinExtInfo
,
ret
);
}
...
...
@@ -141,6 +143,8 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
throw
new
AtlasBaseException
(
AtlasErrorCode
.
INSTANCE_GUID_NOT_FOUND
,
guid
);
}
AtlasAuthorizationUtils
.
verifyAccess
(
new
AtlasEntityAccessRequest
(
typeRegistry
,
AtlasPrivilege
.
ENTITY_READ
,
ret
),
"read entity: guid="
,
guid
);
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== getHeaderById({}): {}"
,
guid
,
ret
);
}
...
...
@@ -165,6 +169,14 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
AtlasEntitiesWithExtInfo
ret
=
entityRetriever
.
toAtlasEntitiesWithExtInfo
(
guids
,
isMinExtInfo
);
if
(
ret
!=
null
){
for
(
String
guid
:
guids
){
AtlasEntity
entity
=
ret
.
getEntity
(
guid
);
AtlasAuthorizationUtils
.
verifyAccess
(
new
AtlasEntityAccessRequest
(
typeRegistry
,
AtlasPrivilege
.
ENTITY_READ
,
new
AtlasEntityHeader
(
entity
)),
"read entity: guid="
,
guid
);
}
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== getByIds({}, {}): {}"
,
guids
,
isMinExtInfo
,
ret
);
}
...
...
@@ -198,6 +210,8 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
uniqAttributes
.
toString
());
}
AtlasAuthorizationUtils
.
verifyAccess
(
new
AtlasEntityAccessRequest
(
typeRegistry
,
AtlasPrivilege
.
ENTITY_READ
,
new
AtlasEntityHeader
(
ret
.
getEntity
())),
"read entity: typeName="
,
entityType
.
getTypeName
(),
", uniqueAttributes="
,
uniqAttributes
);
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"<== getByUniqueAttribute({}, {}): {}"
,
entityType
.
getTypeName
(),
uniqAttributes
,
ret
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment