@Test public void testIsPathMasterForUserIdClusterPath() throws Exception { long userId = 3; String cluster = "local_test"; String path = "/test/sub1"; boolean isMaster = permissionService.isPathMaster(userId, cluster, path); Assert.assertEquals(true, isMaster); }
public boolean isPathMaster(long userId, String cluster, String path) throws ShepherException { if (ClusterUtil.isPublicCluster(cluster)) { return true; } return teamBiz.isAboveRole(cluster, path, Role.MASTER, userId); }
PermissionService { public boolean isPathMaster(long userId, String cluster, String path) throws ShepherException { if (ClusterUtil.isPublicCluster(cluster)) { return true; } return teamBiz.isAboveRole(cluster, path, Role.MASTER, userId); } }
PermissionService { public boolean isPathMaster(long userId, String cluster, String path) throws ShepherException { if (ClusterUtil.isPublicCluster(cluster)) { return true; } return teamBiz.isAboveRole(cluster, path, Role.MASTER, userId); }  }
PermissionService { public boolean isPathMaster(long userId, String cluster, String path) throws ShepherException { if (ClusterUtil.isPublicCluster(cluster)) { return true; } return teamBiz.isAboveRole(cluster, path, Role.MASTER, userId); }  PermissionTeam add(long permissionId, long teamId, Status status); @Transactional boolean add(long teamId, String cluster, String path, Status status); boolean addPending(long teamId, String cluster, String path); boolean addAgree(long teamId, String cluster, String path); List<PermissionTeam> listPermissionTeamsAgree(); List<PermissionTeam> listPermissionTeamsByTeam(long teamId, Status status); List<PermissionTeam> listPermissionTeamsPending(); int updateStatus(long id, Status status); boolean isPathMember(long userId, String cluster, String path); boolean isPathMaster(long userId, String cluster, String path); boolean isPathMaster(String userName, String cluster, String path); }
PermissionService { public boolean isPathMaster(long userId, String cluster, String path) throws ShepherException { if (ClusterUtil.isPublicCluster(cluster)) { return true; } return teamBiz.isAboveRole(cluster, path, Role.MASTER, userId); }  PermissionTeam add(long permissionId, long teamId, Status status); @Transactional boolean add(long teamId, String cluster, String path, Status status); boolean addPending(long teamId, String cluster, String path); boolean addAgree(long teamId, String cluster, String path); List<PermissionTeam> listPermissionTeamsAgree(); List<PermissionTeam> listPermissionTeamsByTeam(long teamId, Status status); List<PermissionTeam> listPermissionTeamsPending(); int updateStatus(long id, Status status); boolean isPathMember(long userId, String cluster, String path); boolean isPathMaster(long userId, String cluster, String path); boolean isPathMaster(String userName, String cluster, String path);  }