Skip to content

Commit

Permalink
Merge pull request #2577 from atlanhq/nikhilcontrolv2
Browse files Browse the repository at this point in the history
Auth exception message
  • Loading branch information
nikhilbonte21 authored Dec 4, 2023
2 parents be2f9a7 + 6ea5930 commit 17d57c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public static void verifyAccess(String guid, String action) throws AtlasBaseExce

try {
if (!isAccessAllowed(guid, action)) {
throw new AtlasBaseException(AtlasErrorCode.UNAUTHORIZED_ACCESS, RequestContext.getCurrentUser(), guid);
throw new AtlasBaseException(AtlasErrorCode.UNAUTHORIZED_ACCESS, userName, action + ":" + guid);
}
} catch (AtlasBaseException e) {
throw e;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
import static java.lang.Boolean.FALSE;
import static org.apache.atlas.AtlasConfiguration.STORE_DIFFERENTIAL_AUDITS;
import static org.apache.atlas.bulkimport.BulkImportResponse.ImportStatus.FAILED;
import static org.apache.atlas.discovery.AtlasAuthorization.isCreateAccessAllowed;
import static org.apache.atlas.discovery.AtlasAuthorization.verifyAccess;
import static org.apache.atlas.discovery.AtlasAuthorization.verifyDeleteEntityAccess;
import static org.apache.atlas.model.instance.AtlasEntity.Status.ACTIVE;
Expand Down

0 comments on commit 17d57c7

Please sign in to comment.