培养方案下放学院维护,学院账号被后端限制在本学院范围;新增按年级、学院、专业联动筛选及维护范围提示。

课程库实行分级维护:学院只能维护本学院的专业必修、专业选修和实践课程;通识课程可查看、引用但不可修改。校级账号保留全校统筹权限。
“排课与课表”已从“教学建设”迁移到“教学运行”,原路由保持不变。
权限规则同时落实在前端和 API,并新增专项测试。
This commit is contained in:
2026-07-24 18:31:33 +08:00 Unverified
parent 022e79c48d
commit 5a7a8d530b
8 changed files with 265 additions and 41 deletions
@@ -0,0 +1,26 @@
using Jiaowu.Api.Domain.Academic;
using Jiaowu.Api.Domain.Identity;
namespace Jiaowu.Api.Infrastructure.Auth;
public static class CourseMaintenancePolicy
{
public static bool CanManage(
CurrentUserScope scope,
Guid collegeId,
CourseNature nature)
{
if (scope.IsInRole(SystemRoles.SuperAdmin) ||
scope.IsInRole(SystemRoles.AcademicAdmin))
return true;
return scope.IsInRole(SystemRoles.CollegeAdmin) &&
scope.CollegeId == collegeId &&
IsCollegeMaintainedNature(nature);
}
public static bool IsCollegeMaintainedNature(CourseNature nature) =>
nature is CourseNature.MajorRequired or
CourseNature.MajorElective or
CourseNature.Practice;
}