Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(privileges) Add Term Groups as targetable entities for privileges #5806

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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