Files
opnform-host-nginx/client
Chirag Chhatrala 2366f9515d Readonly User (#637)
* Readonly User

* Refactor FormPolicy and TemplatePolicy to centralize write operation logic

- Introduced a private method `canPerformWriteOperation` in both FormPolicy and TemplatePolicy to encapsulate the logic for determining if a user can perform write operations on the respective models.
- Updated the `update`, `delete`, `restore`, and `forceDelete` methods in FormPolicy to use the new method for improved readability and maintainability.
- Simplified the `update` and `delete` methods in TemplatePolicy to leverage the centralized write operation logic.

This refactoring enhances code clarity and reduces duplication across policy classes.

* Refactor user and workspace permissions handling

- Updated FormController to authorize form creation based on workspace context.
- Removed the `is_readonly` attribute from UserResource and integrated it into WorkspaceResource for better encapsulation.
- Refactored User model to eliminate the `getIsReadonlyAttribute` method, shifting readonly logic to the Workspace model.
- Adjusted FormPolicy and TemplatePolicy to utilize workspace readonly checks for user permissions.
- Updated various frontend components to reference workspace readonly status instead of user readonly status, enhancing clarity and consistency in permission handling.

These changes improve the management of user permissions in relation to workspaces, ensuring a more robust and maintainable authorization system.

* Fix isReadonlyUser

* fix pint

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-12-30 14:35:23 +01:00
..
2024-12-30 14:35:23 +01:00
2024-12-18 13:07:19 +01:00
2024-04-15 19:39:03 +02:00
2024-12-18 13:07:19 +01:00
2024-09-23 20:02:38 +02:00
2024-12-30 14:35:23 +01:00
2024-08-27 16:49:43 +02:00
2024-09-02 15:33:17 +02:00
2024-10-23 10:34:51 +02:00
2024-04-15 19:39:03 +02:00
2024-10-23 10:34:51 +02:00
2024-08-05 12:06:20 +02:00
2024-08-27 16:49:43 +02:00
2024-09-23 20:02:38 +02:00
2024-11-21 16:14:27 +01:00
2024-06-18 12:31:17 +02:00
2024-06-06 18:03:41 +02:00
2024-09-02 15:33:17 +02:00
2024-12-04 18:32:14 +01:00
2023-12-09 15:47:03 +01:00
2024-04-15 19:39:03 +02:00
2024-11-21 16:14:27 +01:00
2023-12-09 15:47:03 +01:00

Nuxt 3 Minimal Starter

Look at the Nuxt 3 documentation to learn more.

Setup

Make sure to install the dependencies:

# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install

Development Server

Start the development server on http://localhost:3000:

# npm
npm run dev

# pnpm
pnpm run dev

# yarn
yarn dev

# bun
bun run dev

Production

Build the application for production:

# npm
npm run build

# pnpm
pnpm run build

# yarn
yarn build

# bun
bun run build

Locally preview production build:

# npm
npm run preview

# pnpm
pnpm run preview

# yarn
yarn preview

# bun
bun run preview

Check out the deployment documentation for more information.