Skip to content

Commit

Permalink
KYLO-3170 cannot delete template with entity access turned off
Browse files Browse the repository at this point in the history
  • Loading branch information
scottreisdorf committed Dec 4, 2018
1 parent e313564 commit 0859706
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ public boolean deleteTemplate(FeedManagerTemplate.ID id) throws TemplateDeletion

public boolean deleteTemplate(FeedManagerTemplate feedManagerTemplate) throws TemplateDeletionException {
if (feedManagerTemplate != null && (feedManagerTemplate.getFeeds() == null || feedManagerTemplate.getFeeds().size() == 0)) {
feedManagerTemplate.getAllowedActions().checkPermission(TemplateAccessControl.DELETE);

if(accessController.isEntityAccessControlled()) {
feedManagerTemplate.getAllowedActions().checkPermission(TemplateAccessControl.DELETE);
}
addPostFeedChangeAction(feedManagerTemplate, ChangeType.DELETE);
super.delete(feedManagerTemplate);
return true;
Expand Down

0 comments on commit 0859706

Please sign in to comment.