Naalya Handbook
School features

Departments

Department and membership routes, who may do what, the Hub screens, and every reason a delete is refused.

A department is a named group of staff, for the whole school or one campus. Departments carry permissions, sign off schemes of work and own subjects, so deleting one is guarded. The staff guide is Manage departments.

Who can do what

ActionNeedsNotes
Listlist on departmentEach row has a member count and canOpen (whether you may read it)
Openread, or be a member
Createcreate for that campus, or school-wide when no campusA staff creator becomes head. The campus can't change later
EditupdateName and description only
Add, change or remove membersmanage (adding also needs list on staff in the Hub)
Deletedelete on that departmentBeing head isn't enough

A campus department can't be given a school-level permission.

On API staging 6308a8a1 (not on main d0fbb403), DepartmentService.create checks the ceiling when the body includes permissions, and updatePermissions checks it on every replace. A pair the caller does not hold is 403 You can only grant permissions you hold. The rule is on Enforcing access. department.service.ts was read. The test was not run. A merge to staging is not a running deploy.

Members

RouteOperation idDoes
GET .../departments/:departmentId/memberslistDepartmentMembersCursor on staffId, scoped to that department. No role filter on the API
POST .../membersaddDepartmentMembersAdds staff-profile ids, default role member. Each person succeeds or fails alone (already a member, or no such staff); the reply lists success and failed
PATCH .../members/:staffIdupdateDepartmentMemberSets head, manager or member
POST .../members/removeremoveDepartmentMembersRemoves several; anyone not a member fails alone
DELETE .../members/:staffIdremoveDepartmentMemberRemoves one

What stops a delete

Permission. delete on the department, or You do not have permission to delete this department.

References, even with no members:

  • Subjects still assigned to it.
  • It's a signatory slot in a campus's scheme set-up.
  • It has signed scheme approvals (permanent).

Members. Anyone other than you still in it: Cannot delete a department that has members. Remove all members first. If you're the only member, your membership goes with it.

A department that passes is hard-deleted.

In the Hub

ScreenRouteNotes
School list/staff-hub/school/departmentsFilter by campus or school-wide
Campus list/staff-hub/campus/$campusId/departmentsCampus departments first, then school-wide ones (no menu on those)
CreateSurfaceWarns about a duplicate name but doesn't block it. From a campus page, the campus is fixed
Settings tabName and description. Scope is shown, not editable
Members tabSearch asks the API; the role filter runs in the browser

A card you can't open is not a link; its tooltip says "You are not a member of this department".

Two delete buttons that disagree

The card menu disables Delete while the department has members. Delete Department on the settings tab doesn't check, and its copy says it removes "all member associations". The API does not: it refuses while others are members, and the toast shows that refusal.

Some failure toasts drop the API's sentence: creating a department, changing a member's role and removing members. Adding members shows it.

On this page