Skip to content

Commit

Permalink
#18101 renaming a method
Browse files Browse the repository at this point in the history
  • Loading branch information
jdotcms committed Mar 13, 2020
1 parent 154ca36 commit 51c1d3f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -53,7 +53,7 @@ public List<String> saveRoleLayouts(final Role role, final Set<String> layoutIds

final Layout layout = layoutAPI.findLayout(changedLayout);
if (null != layout && UtilMethods.isSet(layout.getId())) {
if (!roleAPI.hasLayoutToRole(layout, role)) {
if (!roleAPI.roleHasLayout(layout, role)) {

roleAPI.addLayoutToRole(layout, role);
layoutsAdded.add(layout.getId());
Expand Down Expand Up @@ -87,7 +87,7 @@ public List<String> deleteRoleLayouts(final Role role, final Set<String> layoutI

final Layout layout = layoutAPI.findLayout(toDeleteLayout);
if (null != layout && UtilMethods.isSet(layout.getId())) {
if (roleAPI.hasLayoutToRole(layout, role)) {
if (roleAPI.roleHasLayout(layout, role)) {

roleAPI.removeLayoutFromRole(layout, role);
layoutsDeleted.add(layout.getId());
Expand Down
Expand Up @@ -254,7 +254,7 @@ public interface RoleAPI {
* @param role {@link Role}
* @return boolean
*/
public boolean hasLayoutToRole(Layout layout, Role role);
public boolean roleHasLayout(Layout layout, Role role);

/**
* Remove a layout from a role
Expand Down
Expand Up @@ -368,7 +368,7 @@ public void addLayoutToRole(final Layout layout, final Role role) throws DotData

@CloseDBIfOpened
@Override
public boolean hasLayoutToRole(final Layout layout, final Role role) {
public boolean roleHasLayout(final Layout layout, final Role role) {

final Optional<LayoutsRoles> layoutsRolesOpt =
this.roleFactory.findLayoutsRoles(layout, role);
Expand Down

0 comments on commit 51c1d3f

Please sign in to comment.