Skip to content

Commit

Permalink
Merge pull request #5 from IQSS/guide_content_may_20
Browse files Browse the repository at this point in the history
Guide content may 20
  • Loading branch information
jp-tosca committed May 22, 2024
2 parents c30c883 + 71cfc30 commit f0271c9
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 31 deletions.
1 change: 0 additions & 1 deletion docs/Sphinx-guides/source/developerGuide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ localEnvironment
deployment
devGuidance
testing
productionEnvironment
guides
useCases/index
28 changes: 27 additions & 1 deletion docs/Sphinx-guides/source/sysadminGuide/environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,31 @@

Currently, the PPR infrastructure is composed be the following installations:

## Production environment

- [Production](https://pre-review.iq.harvard.edu/index.php/iqss/login)
- [Test](http://harvard-ojs-elb-1311151854.eu-west-1.elb.amazonaws.com/iqss/login)

In the production environment, all the files related to the project are located in the `www` directory and you will be able to find the logs on `logs`. Once there the file `config.inc.php` will contain all the important settings created when the application is initialized for the first time.

Some of the settings that can be configured in this file are:

- Database
- Cache
- Localization
- Files
- MIME
- Security
- Email
- Search

In this environment, you will also find the `plugins` folder which will contain the plugin code, the reports plugin will be located in the `reports` directory while the main PPR plugin is located in the `generic` folder.


- [Test-AWS](http://harvard-ojs-elb-1311151854.eu-west-1.elb.amazonaws.com/iqss/login)

## Sandbox environment

- [Sandbox-PKP](https://iqss.sandbox.sfulib8.publicknowledgeproject.org)

In the sandbox environment, you will find more projects that are not related to this plugin, these were set up by PKP probably for testing or setup purposes. In the server, the folders that are related to our installation are `https://iqss.sandbox.sfulib8.publicknowledgeproject.org/` and `pre-review.iq.harvard.edu`.

1 change: 1 addition & 0 deletions docs/Sphinx-guides/source/sysadminGuide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ emailTemplates
environments
config
releases
productionEnvironment
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,3 @@ zless logs/2024-04-secure-error_log.gz
```

## Production Database

## Add admin permissions to a user
In order to grant admin permissions to a user, we need to add the user to the ``admin`` and ``journal manager`` groups.
The ``admin`` group is group_id = 1 and the ``journal manager`` group is group_id = 2.

Verify group ids
```
SELECT * from user_group_settings WHERE setting_value in ('Site Admin', 'default.groups.name.manager');
```

Get the user id
```
SELECT * from users WHERE username = 'username';
```

Verify what groups the user belongs to
```
SELECT * from user_user_groups WHERE user_id = user_id;
```

Add the admin groups to the user
```
INSERT INTO user_user_groups VALUES (1, user_id);
INSERT INTO user_user_groups VALUES (2, user_id);
16 changes: 15 additions & 1 deletion docs/Sphinx-guides/source/sysadminGuide/releases.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Making a release

## Making a Build

Inside the GitHub actions, there is a release workflow that can only be run manually at the moment, this workflow will execute the following actions:

- Increase the version number on the ``VERSION`` file by a minor release
Expand All @@ -15,12 +17,24 @@ The ``plugin-artifacts`` file will contain the following files:
- ``pprOjsPlugin-VERSION.tar.gz``
- ``pprReviewsReportPlugin-VERSION.tar.gz``

## Application deployment

Both plugins **need to be upgraded simultaneously**, you can't have different versions of them even if there are no changes on one of them.

### UI based deployment

To deploy the artifact file on the OJS installation you will find the option under ``Upgrade > Upload file`` located on:

- ``Settings > Website > Plugins > Generic Plugins > IQSS Peer Pre-Review Program Plugin``
- ``Settings > Website > Plugins > Report Plugins > IQSS Peer Pre-Review Report``

Both plugins **need to be upgraded simultaneously**, you can't have different versions of them even if there are no changes on one of them.
### Manual deployment

There is another option to deploy the application by copying the files on the `plugins` directory and decompressing the contents.

*This is the preferred method by the PKP staff*

## Version Verification

You can verify the installed version of your plugin by going to:

Expand Down
24 changes: 20 additions & 4 deletions docs/Sphinx-guides/source/sysadminGuide/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,26 @@ As an administrator, you have the capability to log in as any user within the sy

Please be aware that all actions you perform will be attributed to this user.

## Making other users a ``Super User``
## Add admin permissions to a user
In order to grant admin permissions to a user, we need to add the user to the ``admin`` and ``journal manager`` groups.
The ``admin`` group is group_id = 1 and the ``journal manager`` group is group_id = 2.

You can create multiple ``Super Users`` on the application by adding a special group to it but currently this has to be done directly on the Database.
Verify group ids
```
SELECT * from user_group_settings WHERE setting_value in ('Site Admin', 'default.groups.name.manager');
```

Get the user id
```
SELECT * from users WHERE username = 'username';
```

Verify what groups the user belongs to
```
SELECT * from user_user_groups WHERE user_id = user_id;
```

Add the admin groups to the user
```
TODO: Document the process of adding super users
```
INSERT INTO user_user_groups VALUES (1, user_id);
INSERT INTO user_user_groups VALUES (2, user_id);

0 comments on commit f0271c9

Please sign in to comment.