marco.pms.mobileapp/lib/helpers/utils/permission_constants.dart

121 lines
5.2 KiB
Dart

/// Contains all role, permission, and entity UUIDs used for access control across the application.
class Permissions {
// ------------------- Project Management ------------------------------
/// Permission to manage master data (like dropdowns, configurations)
static const String manageMaster = "588a8824-f924-4955-82d8-fc51956cf323";
/// Permission to create, edit, delete projects
static const String manageProject = "172fc9b6-755b-4f62-ab26-55c34a330614";
/// Permission to view list of all projects
static const String viewProjects = "6ea44136-987e-44ba-9e5d-1cf8f5837ebc";
/// Permission to assign employees to a project
static const String assignToProject = "b94802ce-0689-4643-9e1d-11c86950c35b";
// ------------------- Employee Management -----------------------------
/// Permission to manage employee records
static const String manageEmployees = "a97d366a-c2bb-448d-be93-402bd2324566";
/// Permission to view all employees
static const String viewAllEmployees = "60611762-7f8a-4fb5-b53f-b1139918796b";
/// Permission to view only team members (subordinate employees)
static const String viewTeamMembers = "b82d2b7e-0d52-45f3-997b-c008ea460e7f";
// ------------------- Project Infrastructure --------------------------
/// Permission to manage project infrastructure (e.g., site details)
static const String manageProjectInfra = "cf2825ad-453b-46aa-91d9-27c124d63373";
/// Permission to view infrastructure-related details
static const String viewProjectInfra = "8d7cc6e3-9147-41f7-aaa7-fa507e450bd4";
// ------------------- Attendance Management ---------------------------
/// Permission to regularize (edit/update) attendance records
static const String regularizeAttendance = "57802c4a-00aa-4a1f-a048-fd2f70dd44b6";
// ------------------- Task Management ---------------------------------
/// Permission to create and manage tasks
static const String manageTask = "08752f33-3b29-4816-b76b-ea8a968ed3c5";
/// Permission to approve tasks
static const String approveTask = "db4e40c5-2ba9-4b6d-b8a6-a16a250ff99c";
/// Permission to view task lists and details
static const String viewTask = "9fcc5f87-25e3-4846-90ac-67a71ab92e3c";
/// Permission to assign tasks for reporting
static const String assignReportTask = "6a32379b-8b3f-49a6-8c48-4b7ac1b55dc2";
// ------------------- Directory Roles ---------------------------------
/// Admin-level directory access
static const String directoryAdmin = "4286a13b-bb40-4879-8c6d-18e9e393beda";
/// Manager-level directory access
static const String directoryManager = "62668630-13ce-4f52-a0f0-db38af2230c5";
/// Basic directory user access
static const String directoryUser = "0f919170-92d4-4337-abd3-49b66fc871bb";
// ------------------- Expense Permissions -----------------------------
/// View only own expenses
static const String expenseViewSelf = "385be49f-8fde-440e-bdbc-3dffeb8dd116";
/// View all employee expenses
static const String expenseViewAll = "01e06444-9ca7-4df4-b900-8c3fa051b92f";
/// Create/upload new expenses
static const String expenseUpload = "0f57885d-bcb2-4711-ac95-d841ace6d5a7";
/// Review submitted expenses
static const String expenseReview = "1f4bda08-1873-449a-bb66-3e8222bd871b";
/// Approve or reject expenses
static const String expenseApprove = "eaafdd76-8aac-45f9-a530-315589c6deca";
/// Process expenses for payment or final action
static const String expenseProcess = "ea5a1529-4ee8-4828-80ea-0e23c9d4dd11";
/// Full access to manage all expense operations
static const String expenseManage = "ea5a1529-4ee8-4828-80ea-0e23c9d4dd11";
/// ID used to track expenses in "Draft" status
static const String expenseDraft = "297e0d8f-f668-41b5-bfea-e03b354251c8";
/// List of user IDs who rejected the expense (used for audit trail)
static const List<String> expenseRejectedBy = [
"d1ee5eec-24b6-4364-8673-a8f859c60729",
"965eda62-7907-4963-b4a1-657fb0b2724b",
];
// ------------------- Application Roles -------------------------------
/// Application role ID for users with full expense management rights
static const String expenseManagement = "a4e25142-449b-4334-a6e5-22f70e4732d7";
// ------------------- Document Entities -------------------------------
/// Entity ID for project documents
static const String projectEntity = "c8fe7115-aa27-43bc-99f4-7b05fabe436e";
/// Entity ID for employee documents
static const String employeeEntity = "dbb9555a-7a0c-40f2-a9ed-f0463f1ceed7";
// ------------------- Document Permissions ----------------------------
/// Permission to view documents
static const String viewDocument = "71189504-f1c8-4ca5-8db6-810497be2854";
/// Permission to upload documents
static const String uploadDocument = "3f6d1f67-6fa5-4b7c-b17b-018d4fe4aab8";
/// Permission to modify documents
static const String modifyDocument = "c423fd81-6273-4b9d-bb5e-76a0fb343833";
/// Permission to delete documents
static const String deleteDocument = "40863a13-5a66-469d-9b48-135bc5dbf486";
/// Permission to download documents
static const String downloadDocument = "404373d0-860f-490e-a575-1c086ffbce1d";
/// Permission to verify documents
static const String verifyDocument = "13a1f30f-38d1-41bf-8e7a-b75189aab8e0";
}