Обновление прав.Разработчики могут произвольно работать с багами
v++
This commit is contained in:
@@ -13,6 +13,6 @@ public class AppendBugReportComment extends AppendBugReportField {
|
||||
}
|
||||
@Override
|
||||
protected boolean canUpdate() {
|
||||
return Global.mainModule.getAccount().ExtendedCheckAccessRights(target, Log);
|
||||
return target.canAppend(Global.mainModule.getAccount(),Log);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class AppendBugReportField extends ComponentsRepositoryPass<BugReport> {
|
||||
return "";
|
||||
}
|
||||
protected boolean canUpdate() {
|
||||
return Global.mainModule.getAccount().CheckAccessRights(target.sender_address, Log);
|
||||
return target.canModify(Global.mainModule.getAccount(),Log);
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
|
||||
@@ -10,7 +10,7 @@ public class DeleteBugReport extends DeleteObjectPass<BugReport> {
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
return super.canStart(args) && Global.mainModule.getAccount().CheckAccessRights(target.sender_address, Log);
|
||||
return super.canStart(args) && target.canModify(Global.mainModule.getAccount(),Log);
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
|
||||
@@ -32,7 +32,8 @@ public class PublishBugReport extends Pass<BugReport> {
|
||||
if (!UI.Question("Для отчёта об ошибке не назначен исполнитель.\nВсе равно опубликовать его"))
|
||||
return false;
|
||||
}
|
||||
if (!Global.mainModule.getAccount().CheckAccessRights(target.sender_address, Log) && (target.CheckDraft(Log))) {
|
||||
if (!Global.mainModule.getAccount().CheckAuthorship(target.sender_address, Log)
|
||||
&& (target.CheckDraft(Log))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -20,7 +20,7 @@ public class UpdateBugReportField extends ComponentsRepositoryPass<BugReport> {
|
||||
String old_description = "";
|
||||
String old_comment = "";
|
||||
protected boolean canUpdate() {
|
||||
return Global.mainModule.getAccount().CheckAccessRights(target.sender_address, Log);
|
||||
return target.canModify(Global.mainModule.getAccount(),Log);
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
|
||||
@@ -22,6 +22,6 @@ public class UpdateBugReportProgress extends UpdateBugReportField {
|
||||
}
|
||||
@Override
|
||||
protected boolean canUpdate() {
|
||||
return Global.mainModule.getAccount().ExtendedCheckAccessRights(target, Log);
|
||||
return target.canAppend(Global.mainModule.getAccount(), Log);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user