Skip to content

Commit

Permalink
Merge pull request #20 from smithjilks/NOISSUE-update-policies-docs
Browse files Browse the repository at this point in the history
NOISSUE - Update computation policies docs
  • Loading branch information
drasko authored Aug 23, 2024
2 parents 0def7e2 + dc017ea commit 66631a1
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 16 deletions.
Binary file added docs/img/ui/computation_details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/ui/computation_policies.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/ui/computations_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/ui/new_computation_policy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/ui/update_computation_policy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 33 additions & 16 deletions docs/policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ Content-Length: 0
```

On the UI the steps are as follows:
1. Login as an Administrator and click on 'Policies' on the side navigation panel.
2. Click on 'New Computation Policies' button on the top left.
![List Policies](img/ui/policies.png)
3. Select the required details and click 'Create'
![New Policy](img/ui/new policy.png)

1. Login as an administrator/computation owner and click on 'Computations' on the side navigation panel.
![List Computations](img/ui/computations_list.png)
2. Select a computation and click on 'Members'
![Computation Details](img/ui/computation_details.png)
3. Click on 'New Computation Policy' button on the top left.
![List Policies](img/ui/computation_policies.png)
4. Select the required details and click 'Create'
![New Policy](img/ui/new_computation_policy.png)

### Updating Computation Policies

Expand Down Expand Up @@ -87,25 +91,29 @@ Content-Length: 0
```

On the UI the steps are as follows:
1. Click on the edit button on any of the policies to edit.
![Update Policy](img/ui/update policy.png)
2. Select required details and click on 'Update'.
![Update Policy Page](img/ui/update policy page.png)

1. Login as an administrator/computation owner and click on 'Computations' on the side navigation panel.
![List Computations](img/ui/computations_list.png)
2. Select a computation and click on 'Members'
![Computation Details](img/ui/computation_details.png)
3. Click on the edit button on any of the policies to edit.
![List Policies](img/ui/computation_policies.png)
4. Select required details and click on 'Update'.
![Update Policy Page](img/ui/update_computation_policy.png)


### Lisiting Computation Policies

As an admin, you can list all the policies, while as a user you can only list your own policies.
As an administrator/computation owner, you can list all the policies in a computation, while as a user you can only list your own policies in a computation.

```bash
curl -isSX GET https://prism.ultraviolet.rs/computations/policies -H "Authorization: Bearer <user_token>"
curl -isSX GET https://prism.ultraviolet.rs/computations/policies/<computation_id> -H "Authorization: Bearer <user_token>"
```

For example:

```bash
curl -isSX GET https://prism.ultraviolet.rs/computations/policies -H "Authorization: Bearer <user_token>"
curl -isSX GET https://prism.ultraviolet.rs/computations/policies/3b273eed-155f-4b56-9408-a29a93cc47b6 -H "Authorization: Bearer <user_token>"

HTTP/1.1 200 OK
Content-Type: application/json
Expand Down Expand Up @@ -137,8 +145,12 @@ Content-Length: 1785
```

On the UI the steps are as follows:
1. Login as an Administrator and click on 'Policies' on the side navigation panel.
![List Policies](img/ui/policies.png)

1. Login and click on 'Computations' on the side navigation panel.
![List Computations](img/ui/computations_list.png)
2. Select a computation and click on 'Members'
![Computation Details](img/ui/computation_details.png)
![List Policies](img/ui/computation_policies.png)

### Delete Computation Policies

Expand All @@ -159,8 +171,13 @@ Date: Sun, 26 May 2024 11:05:16 GMT
```

On the UI the steps are as follows:
1. Click on the delete button on any of the policies to delete.
![Delete Policy](img/ui/delete policy.png)

1. Login as an administrator/computation owner and click on 'Computations' on the side navigation panel.
![List Computations](img/ui/computations_list.png)
2. Select a computation and click on 'Members'
![Computation Details](img/ui/computation_details.png)
3. Click on the delete button on any of the policies to delete.
![List Policies](img/ui/computation_policies.png)


If you delete policies, the policy will be removed from the policy storage. Further authorization checks related to that policy will fail.

0 comments on commit 66631a1

Please sign in to comment.