-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #515 from Krishna-Baldwa/idf2
Acad Discussion Forum (Multiple Communities)
- Loading branch information
Showing
15 changed files
with
279 additions
and
33 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Generated by Django 3.2.16 on 2023-07-07 14:40 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import multiselectfield.db.fields | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("community", "0028_auto_20221003_2130"), | ||
("roles", "0019_alter_bodyrole_permissions"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="CommunityRole", | ||
fields=[ | ||
( | ||
"id", | ||
models.UUIDField( | ||
default=uuid.uuid4, | ||
editable=False, | ||
primary_key=True, | ||
serialize=False, | ||
), | ||
), | ||
("time_of_creation", models.DateTimeField(auto_now_add=True)), | ||
("name", models.CharField(max_length=50)), | ||
("inheritable", models.BooleanField(default=False)), | ||
( | ||
"permissions", | ||
multiselectfield.db.fields.MultiSelectField( | ||
choices=[ | ||
("AddE", "Add Event"), | ||
("UpdE", "Update Event"), | ||
("DelE", "Delete Event"), | ||
("UpdB", "Update Body"), | ||
("Role", "Modify Roles"), | ||
("VerA", "Verify Achievements"), | ||
("AppP", "Moderate Post"), | ||
("ModC", "Moderate Comment"), | ||
], | ||
max_length=39, | ||
), | ||
), | ||
("priority", models.IntegerField(default=0)), | ||
("official_post", models.BooleanField(default=True)), | ||
("permanent", models.BooleanField(default=False)), | ||
( | ||
"community", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="roles", | ||
to="community.community", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "Community Role", | ||
"verbose_name_plural": "Community Roles", | ||
"ordering": ("community__name", "priority"), | ||
}, | ||
), | ||
] |
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,16 @@ | ||
# Generated by Django 3.2.16 on 2023-07-22 13:35 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("users", "0043_remove_userprofile_community_roles"), | ||
("roles", "0020_communityrole"), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name="CommunityRole", | ||
), | ||
] |
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,20 @@ | ||
# Generated by Django 3.2.16 on 2023-07-07 14:40 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("roles", "0020_communityrole"), | ||
("users", "0040_remove_userprofile_followed_communities"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="userprofile", | ||
name="community_roles", | ||
field=models.ManyToManyField( | ||
blank=True, related_name="users", to="roles.CommunityRole" | ||
), | ||
), | ||
] |
Oops, something went wrong.