fixing some permission-related TODOs
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -42,7 +42,7 @@ public class CompanyModule extends BaseHandler implements CompanyService {
|
||||
var company = get(companyId);
|
||||
if (!membership(companyId,user.id())) throw forbidden("You are mot a member of company {company}", COMPANY,company.name());
|
||||
if (!documentService().list(companyId).isEmpty()) throw forbidden("There are documents owned by {company}", COMPANY,company.name());
|
||||
if (!itemService().redefineMe(companyId).isEmpty()) throw forbidden("There are items owned by {company}", COMPANY,company.name());
|
||||
if (!itemService().getCompanyItems(companyId).isEmpty()) throw forbidden("There are items owned by {company}", COMPANY,company.name());
|
||||
if (!projectService().listCompanyProjects(companyId,true).isEmpty()) throw forbidden("There are projects owned by {company}", COMPANY,company.name());
|
||||
return sendContent(ex, companyDb.drop(companyId));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user