Skip to content

Commit

Permalink
fix(privileges) Add Term Groups as targetable entities for privileges (
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscollins3456 authored Sep 1, 2022
1 parent 5bf5fc2 commit b0fc67b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ private EntityType mapResourceTypeToEntityType(final String resourceType) {
return EntityType.TAG;
} else if (com.linkedin.metadata.authorization.PoliciesConfig.GLOSSARY_TERM_PRIVILEGES.getResourceType().equals(resourceType)) {
return EntityType.GLOSSARY_TERM;
} else if (com.linkedin.metadata.authorization.PoliciesConfig.GLOSSARY_NODE_PRIVILEGES.getResourceType().equals(resourceType)) {
return EntityType.GLOSSARY_NODE;
} else if (com.linkedin.metadata.authorization.PoliciesConfig.DOMAIN_PRIVILEGES.getResourceType().equals(resourceType)) {
return EntityType.DOMAIN;
} else if (com.linkedin.metadata.authorization.PoliciesConfig.CONTAINER_PRIVILEGES.getResourceType().equals(resourceType)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,20 @@ public class PoliciesConfig {
EDIT_ENTITY_PRIVILEGE)
);

// Glossary Node Privileges
public static final ResourcePrivileges GLOSSARY_NODE_PRIVILEGES = ResourcePrivileges.of(
"glossaryNode",
"Glossary Term Groups",
"Glossary Term Groups created on DataHub",
ImmutableList.of(
VIEW_ENTITY_PAGE_PRIVILEGE,
EDIT_ENTITY_OWNERS_PRIVILEGE,
EDIT_ENTITY_DOCS_PRIVILEGE,
EDIT_ENTITY_DOC_LINKS_PRIVILEGE,
EDIT_ENTITY_DEPRECATION_PRIVILEGE,
EDIT_ENTITY_PRIVILEGE)
);

// Group Privileges
public static final ResourcePrivileges CORP_GROUP_PRIVILEGES = ResourcePrivileges.of(
"corpGroup",
Expand Down Expand Up @@ -376,6 +390,7 @@ public class PoliciesConfig {
CONTAINER_PRIVILEGES,
DOMAIN_PRIVILEGES,
GLOSSARY_TERM_PRIVILEGES,
GLOSSARY_NODE_PRIVILEGES,
CORP_GROUP_PRIVILEGES,
CORP_USER_PRIVILEGES,
NOTEBOOK_PRIVILEGES
Expand Down

0 comments on commit b0fc67b

Please sign in to comment.