-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* A new model was created that allows to associate a user group to a release. The queries for the release and dataset views have been changed so that only records related to public releases or releases associated with the group that the user belongs to are returned. An additional get_user_releases method was created for the User models, this method returns all the release ids that the user is allowed to access. Closed #1363 * minor fix
- Loading branch information
1 parent
f396008
commit a745795
Showing
10 changed files
with
161 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.17 on 2021-05-19 14:25 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('coadd', '0004_release_rls_disabled'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='release', | ||
name='rls_is_public', | ||
field=models.BooleanField(default=False, help_text='Mark the release as public so that it is available to all users. uncheck it to make it available only to groups that have permission.', verbose_name='Is Public'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 2.2.17 on 2021-05-20 18:29 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('coadd', '0005_release_rls_is_public'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='ReleaseGroupPermission', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('rgp_release', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='release_group_permission', to='coadd.Release', verbose_name='Release')), | ||
('rgp_user_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='coadd.Release', verbose_name='User Group')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 2.2.17 on 2021-05-20 18:49 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('coadd', '0006_releasegrouppermission'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='releasegrouppermission', | ||
name='rgp_user_group', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.Group', verbose_name='User Group'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters