Image Factory Documentation

Owner/Admin Role - Feature & Permission Checklist

Role Types

  • RBAC Role: "Owner" or "Administrator" (tenant-specific RBAC system)
  • Legacy Fallback: Users with tenant group role_type = "owner" or "administrator"

โœ… Always Visible (All Authenticated Users)

  • Dashboard (/dashboard) - Overview and analytics
  • Projects (/projects) - List all projects in current tenant
  • Images (/images) - Browse container image catalog
  • Profile (/profile) - View user profile
  • Settings (/settings) - User account settings

โœ… Owner/Admin Only

  • Builds (/builds) - Build management and creation
  • Tenants (/tenants) - Manage tenant organizations (only if Owner/Admin role)

โŒ System Admin Only

  • Admin Dashboard (/admin/dashboard) - System-wide statistics and management

Feature Breakdown by Page

๐Ÿ“Š Dashboard

  • Available to: All authenticated users
  • Features:
    • View overview/analytics for current tenant
    • See aggregated stats across projects

๐Ÿ“ Projects

  • Available to: All authenticated users (viewing)
  • Owner/Admin Capabilities:
    • โœ… Create new project (/projects/new)
    • โœ… View project details
    • โœ… Edit project properties:
      • Project name
      • Description
      • Repository URL
      • Branch
    • โœ… View project members (NEW - Member Management Feature)
    • โœ… Manage project members:
      • Add members to project
      • Edit member roles (assign RBAC roles)
      • Remove members from project
    • โœ… View build history for project
    • โœ… Create builds from project

๐Ÿ”จ Builds

  • Available to: Owner, Admin, Developer, Operator roles
  • Owner/Admin Capabilities:
    • โœ… View all builds in tenant
    • โœ… Create new build (/builds/new)
    • โœ… View build details
    • โœ… View build logs
    • โœ… Cancel running builds (if in progress)
    • โœ… Restart/retry builds

๐Ÿ–ผ๏ธ Images

  • Available to: All authenticated users (read-only default)
  • Features:
    • โœ… Browse image catalog
    • โœ… Search/filter images
    • โœ… View image details
    • โœ… View image versions and tags

๐Ÿข Tenants (Owner/Admin Only)

  • Available to: Owner/Admin role only
  • Features:
    • โœ… View all tenants in system
    • โœ… Create new tenant
    • โœ… View tenant details
    • โœ… Edit tenant properties (future)
    • โœ… Delete tenants
    • โœ… View tenant quotas

โš™๏ธ Settings (All Users)

  • Available to: All authenticated users
  • Features:
    • โœ… Account settings (email, theme, timezone)
    • โœ… Security settings (password, 2FA) - planned
    • โœ… Notification preferences - planned

๐Ÿ‘ค Profile (All Users)

  • Available to: All authenticated users
  • Features:
    • โœ… View user profile
    • โœ… Edit basic profile info
    • โœ… Manage profile picture

Member Management Capabilities (NEW - Owner/Admin in Projects)

๐Ÿ“‹ For Project Members

The Owner/Admin can now manage who has access to projects:

Add Members

  • โœ… Search and add users to project
  • โœ… Add by selecting available users
  • โœ… User must exist in system first

Edit Member Roles

  • โœ… Change member's RBAC role
  • โœ… Available roles: Owner, Administrator, Developer, Operator, Viewer
  • โœ… Clear role (remove specific role)

Remove Members

  • โœ… Delete member from project
  • โœ… Confirmation dialog before removal
  • โœ… Audit log entry created

View Member Details

  • โœ… See member name and email
  • โœ… See assigned role
  • โœ… See join date

Permission Checks in Code

Access Control Logic

Is Owner/Admin? โ†’ canManageTenants = TRUE, canCreateBuilds = TRUE
Is Developer/Operator? โ†’ canCreateBuilds = TRUE, canManageTenants = FALSE
Is Viewer? โ†’ canCreateBuilds = FALSE, canManageTenants = FALSE
All Users? โ†’ canViewImages = TRUE, canManageSettings = TRUE

Admin Dashboard (System Admin Only)

  • โœ… View system-wide statistics
  • โœ… Manage users globally
  • โœ… View audit logs
  • โœ… System configuration
  • โš ๏ธ Currently redirects non-admins to dashboard

Testing Plan for Owner/Admin Role

Test User Profile

  • Username: (an Owner-level user from your LDAP/database)
  • Roles: Owner or Administrator in at least one tenant
  • Expected: Should see Projects, Builds, Images, Tenants, Settings

Test Cases to Execute

1. Navigation Visibility

  • Can see Tenants nav item
  • Can see Builds nav item
  • Cannot see Admin Dashboard nav item (unless system admin)

2. Project Management

  • View list of projects
  • Create new project โœ… (already tested)
  • Edit project details
  • Delete project (if implemented)

3. Member Management (NEW - High Priority)

  • Open project detail page
  • Click "Members" tab
  • See list of existing members
  • Click "Add Member" button
  • Search for user to add
  • Add member to project โœ… (already tested)
  • Edit member role (change role dropdown)
  • Delete member (with confirmation)
  • Verify member is removed from list

4. Build Management

  • View list of builds
  • Create build from project
  • View build details and logs
  • Cancel build (if running)

5. Image Management

  • Browse image catalog
  • Search images
  • View image details

6. Tenant Management

  • View list of tenants (Owner/Admin only)
  • Create new tenant
  • Edit tenant (future)
  • Delete tenant (future)

7. Role-Based Visibility

  • Switch to a different tenant with only Viewer role
  • Verify Tenants nav item is hidden
  • Verify Builds nav item is hidden
  • Switch back to Owner role tenant
  • Verify nav items reappear

Audit Trail

All Owner/Admin actions are logged:

  • โœ… Member additions
  • โœ… Member role changes
  • โœ… Member removals
  • โœ… Project updates
  • โœ… Build operations
  • โœ… Tenant operations

Known Limitations / Future Enhancements

  1. Bulk Operations - Cannot bulk-manage multiple members/projects yet
  2. Batch Permissions - No role assignment templates
  3. Quota Management - Cannot modify tenant quotas from UI yet
  4. Project Transfer - Cannot transfer project ownership to another user
  5. Member Invitations - Cannot invite external users (must exist in system first)
  6. Scheduled Builds - Not yet implemented
  7. Build Webhooks - Not yet configured
  8. Image Push Permissions - Need to verify who can push images

Components

  • frontend/src/pages/projects/ProjectDetailPage.tsx - Project details with tabs
  • frontend/src/components/projects/ProjectMembersUI.tsx - Member management UI
  • frontend/src/pages/tenants/TenantsPage.tsx - Tenant listing (new)
  • frontend/src/components/layout/Layout.tsx - Role-based navigation

Services

  • frontend/src/services/projectService.ts - Project API calls
  • frontend/src/services/memberApi.ts - Member management API
  • frontend/src/services/tenantService.ts - Tenant API calls

Backend Endpoints

  • GET /api/v1/projects - List projects
  • POST /api/v1/projects - Create project
  • GET /api/v1/projects/{id} - Get project
  • PATCH /api/v1/projects/{id} - Update project
  • GET /api/v1/projects/{id}/members - List members
  • POST /api/v1/projects/{id}/members - Add member
  • PATCH /api/v1/projects/{id}/members/{userId} - Update member role
  • DELETE /api/v1/projects/{id}/members/{userId} - Remove member
  • GET /api/v1/tenants - List tenants
  • POST /api/v1/tenants - Create tenant
  • DELETE /api/v1/tenants/{id} - Delete tenant

Quick Reference: Owner/Admin vs Other Roles

Feature Owner/Admin Developer Operator Viewer System Admin
Dashboard โœ… โœ… โœ… โœ… โœ…
Projects โœ… (CRUD) โœ… (R) โœ… (R) โœ… (R) โœ… (R)
Builds โœ… (CRUD) โœ… (CRUD) โœ… (RUN) โœ… (R) โœ…
Images โœ… โœ… โœ… โœ… โœ…
Members โœ… (MANAGE) โœ… (VIEW) โœ… (VIEW) โœ… (VIEW) โœ…
Tenants โœ… (MANAGE) โŒ โŒ โŒ โœ…
Settings โœ… (SELF) โœ… (SELF) โœ… (SELF) โœ… (SELF) โœ… (SELF)
Admin Panel โŒ โŒ โŒ โŒ โœ…

Legend: CRUD = Create/Read/Update/Delete, R = Read, RUN = Run/Start, MANAGE = Full control, VIEW = Read-only