Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dsgvo deletion #509

Open
wants to merge 394 commits into
base: redesign-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
394 commits
Select commit Hold shift + click to select a range
97a1a10
No longer show all deactivated groups to superusers
saschasommer Aug 8, 2024
6e34048
Feature/v3 navigation refactor (#475)
saschasommer Aug 9, 2024
6443214
v2.0.6 DINA #832: fix v3 redirects for trainersearch, endless_pagination
saschasommer Aug 14, 2024
73c3474
Merge branch 'redesign-staging-dina' into redesign-dev
saschasommer Aug 14, 2024
0e371ef
Merge branch 'redesign-staging-dina' into main-redesign-dina
saschasommer Aug 14, 2024
9e78a7c
v2.0.7: make all endless_pagination reloads v3 exempt
saschasommer Aug 14, 2024
e7f44b8
Merge branch 'redesign-staging-dina' into redesign-dev
saschasommer Aug 14, 2024
4c92e8f
Add linebreak to third-party tools tile in user dashboard
saschasommer Aug 15, 2024
e4a9431
v3 navigation: fix tests, spaces label, add language select conf check
saschasommer Aug 15, 2024
1351775
Redesign #322: add missing sub_items to id=ChangeLanguage leftnav btn
saschasommer Aug 18, 2024
3384aa9
Redesign #332: add v3 main content support for is_external links
saschasommer Aug 18, 2024
e827e25
Merge branch 'redesign-staging' into main-redesign
saschasommer Aug 18, 2024
a043654
wechange-frontend #74: Fix FA icon typo in "fa-hand-holding-heart"
saschasommer Aug 18, 2024
2601192
Redesign #328: Move views with user-UI from /account/ to /profile/
saschasommer Aug 18, 2024
1dd8bbc
Merge branch 'feature/redesign-navi-additions' into redesign-dev
saschasommer Aug 18, 2024
ce97dd2
Fix "leave fullscreen" button not showing in group video frames
saschasommer Aug 19, 2024
8df3c95
Fix "leave fullscreen" button not showing in group video frames
saschasommer Aug 19, 2024
53f480a
v2.0.8: Fix BBB "leave fullscreen" button missing
saschasommer Aug 22, 2024
6f926c7
Merge branch 'redesign-staging-dina' into main-redesign-dina
saschasommer Aug 22, 2024
53d16e0
Merge branch 'redesign-staging-dina' into redesign-dev
saschasommer Aug 22, 2024
d35e8cb
Add payment tests
2e2a Aug 22, 2024
84c80ba
Convert RocketChat hook threads into Celery tasks (#473)
2e2a Sep 4, 2024
a8d7dfb
Fix check for user being the only admin during profile deactivation (…
2e2a Sep 4, 2024
7c9d52d
Replace result project iframe with button (#479)
2e2a Sep 9, 2024
8297eb4
Remove create events button from result projects (#480)
2e2a Sep 10, 2024
b4fb13e
NextCloud and RocketChat Admin Integration (#481)
2e2a Sep 11, 2024
ed02f20
#331: Add BBB iframe class 'fullscreen' for fullscreen mode
saschasommer Sep 11, 2024
a00c738
#321: v3: Fix missing 'fa-cog' icon in user profile
saschasommer Sep 11, 2024
771b2e4
Allow access to public BBB rooms (#482)
2e2a Sep 12, 2024
0f017b3
Redesign #308: Add breadcrumb to sub-folders in v3 main content only
saschasommer Sep 12, 2024
bc1b810
redesign #312: Neue Icons
saschasommer Sep 12, 2024
18dc4c0
redesign #312: Neue Icons (add missed icons)
saschasommer Sep 16, 2024
b9ed248
Swagger config: enforce strict "https" scheme in production environments
saschasommer Aug 8, 2024
c315792
v1.20.16: Fix swagger definition including "http" as protocol
saschasommer Sep 17, 2024
13f50f5
Merge branch 'redesign-staging' into main-redesign
saschasommer Sep 17, 2024
b051b8d
Add membership alerts to navigation api (#483)
2e2a Sep 17, 2024
cdc69f5
Add the "about" menu item to the navigation profile endpoint (#484)
2e2a Sep 17, 2024
c337b3e
Add tests for the membership alerts api (#485)
2e2a Sep 17, 2024
6a4d364
Log out user from other session and RocketChat on email change (#486)
2e2a Sep 18, 2024
86f9909
direkterra #44: fix reported security issues
saschasommer Sep 23, 2024
7556a1b
Fix 112383: patch jQuery.htmlPrefilter method
saschasommer Sep 23, 2024
77cc5e3
v1.20.17: Security Fixes patch
saschasommer Sep 23, 2024
c224410
Merge branch 'feature/security-fixes' into redesign-staging
saschasommer Sep 23, 2024
94bc6d2
Merge branch 'redesign-staging' into main-redesign
saschasommer Sep 23, 2024
8cf7f44
wechange #1807: Add blocks video_conference_frame
saschasommer Sep 25, 2024
79ab95a
Add cron job to delete old sent mail logs (#478)
2e2a Sep 26, 2024
161f182
Merge branch 'redesign-staging' into main-redesign
saschasommer Sep 30, 2024
827b9b7
Update setup.py for new dependabot CVS
saschasommer Oct 1, 2024
0086bdc
Fixup: Log out user from other session and RocketChat on email change…
2e2a Oct 2, 2024
6e6b927
v3 api: fix Home menu link ID.
saschasommer Oct 2, 2024
63af38e
v3 api: add 'max_length' attribute to field definitions
saschasommer Oct 2, 2024
ede67fd
Avoid multiple profile saves when logging out users after email chang…
2e2a Oct 2, 2024
373be5c
Override home link setting in navigation tests (#489)
2e2a Oct 7, 2024
eb3c542
Cache unread alerts api result (#490)
2e2a Oct 7, 2024
a570b32
Hide elements on RochetChat login page (#491)
2e2a Oct 7, 2024
585825b
setup.py: freeze 'icalendar==5.0.12' (is ours, was not frozen before)
saschasommer Oct 9, 2024
f94d071
Merge branch 'redesign-staging' into main-redesign
saschasommer Oct 9, 2024
71d304d
Feature/spam user admin actions (#492)
saschasommer Oct 9, 2024
4ca502c
v3 navigation api: add COSINNUS_V3_COMMUNITY_HEADER_CUSTOM_LABEL setting
saschasommer Oct 9, 2024
eeb9531
Merge branch 'main-redesign' into redesign-dev
saschasommer Oct 15, 2024
7a5bc8d
Remove unused invalid RocketChat Celery task
2e2a Oct 15, 2024
d9c6922
Minor code style
saschasommer Oct 15, 2024
b821cee
v2.1.0: Bump version and add version history notes for Release v2.1.0
saschasommer Oct 15, 2024
71c6a86
version history: bump the redesign note to the top
saschasommer Oct 15, 2024
6500719
Merge pull request #493 from wechange-eg/redesign-dev
saschasommer Oct 15, 2024
8e3f365
Fixed typos in version_history
saschasommer Oct 15, 2024
0748269
Add small manage command to print counts of user profile languages
saschasommer Oct 15, 2024
2b3cb83
wechange #1809: Fix userprofile admin link in profile detail
saschasommer Oct 15, 2024
fd06d43
Cloud: ALWAYS show the cloud error message in dashboard widget
saschasommer Oct 16, 2024
96bee08
Merge branch 'redesign-staging' into main-redesign
saschasommer Oct 16, 2024
0ba11d1
Merge branch 'main-redesign' into release/test/redesign-release-2
saschasommer Oct 16, 2024
c9dd56c
Nextcloud: show abbreviated non-error message in dashboard widget.
saschasommer Oct 16, 2024
f873c4f
Merge branch 'release/redesign-release-2' into redesign-dev
saschasommer Oct 16, 2024
0bfdd90
Admin spam actions:: add safety check so admins can't be deactivated
saschasommer Oct 16, 2024
7270833
Merge branch 'release/test/redesign-release-2' into redesign-dev
saschasommer Oct 16, 2024
5ba6fd1
Extend backend to support adhocracy API
2e2a Oct 10, 2024
8345360
Add external resource model, serializer and index
2e2a Oct 10, 2024
7b774ba
Add external resource translation class
2e2a Oct 15, 2024
6fdbfb4
Add setting for external resource support
2e2a Oct 15, 2024
aa5843f
Add external resources to map
2e2a Oct 15, 2024
a49bce7
Allow to add additional context to template char fields
2e2a Oct 15, 2024
8dea173
Add external resources to the search
2e2a Oct 15, 2024
66ef135
Add translations
2e2a Oct 16, 2024
d3b6088
Fix single group meeting BBB page
saschasommer Oct 16, 2024
228a7c3
v3 BBB guest access: remove v3 excemption and never-redirect
saschasommer Oct 16, 2024
5b7a7fe
v3: Fix BBB guest page site structure to fit with main content
saschasommer Oct 16, 2024
46c8b33
v3 navigation profile: add COSINNUS_V3_MENU_HOME_LINK_LABEL conf
saschasommer Oct 17, 2024
4cd9d7d
User ui-flags API (#495)
2e2a Oct 17, 2024
d85d9da
Fabric: add task `restartcelery`
saschasommer Oct 22, 2024
fbc9244
v3: Remove seperate Calendar icon in navigation-services api
saschasommer Oct 23, 2024
e4a8f2d
Fabric: add task `restartcelery`
saschasommer Oct 22, 2024
3444862
v3: Remove seperate Calendar icon in navigation-services api
saschasommer Oct 23, 2024
b1a429e
Merge branch 'feature/external-resources' into release/test/redesign-…
saschasommer Oct 23, 2024
3ec2485
Add support for late conference invitations (#497)
2e2a Oct 23, 2024
78f2501
v3: hide group dashboard breadcrumb in main content view
saschasommer Oct 23, 2024
11669ee
v3: hide group dashboard breadcrumb in main content view
saschasommer Oct 23, 2024
fc36202
Notify users of user-match likes
2e2a Oct 24, 2024
3b26831
User ui-flags API (#495)
2e2a Oct 17, 2024
604def8
Merge branch 'release/test/redesign-release-2.1' into redesign-dev
saschasommer Oct 28, 2024
911c1a7
Fix user matching liked user link
2e2a Oct 28, 2024
0194eb5
Enable django-admin BBB portal inline if group BBB is enabled
saschasommer Oct 29, 2024
8e01204
Cherrypick payments test environment/settings
saschasommer Oct 29, 2024
d5d6f10
Improve robots.txt (#498)
2e2a Oct 29, 2024
30ad8f1
Add an empty alt attribute to email location map marker image
2e2a Oct 29, 2024
131dc9b
Set continentalpayment as payment test api
saschasommer Oct 30, 2024
15df3b3
Merge branch 'redesign-staging-payl' into redesign-dev
saschasommer Oct 30, 2024
7391786
Merge remote-tracking branch 'origin/feature/payments-tests' into red…
saschasommer Oct 30, 2024
b78425d
Rework main menu links (#499)
2e2a Oct 31, 2024
9c84649
Set icon for main menu "Go To" element
2e2a Nov 4, 2024
0e3bb25
v3: Fix "usecached" POST redirect logic redirecting error responses
saschasommer Nov 4, 2024
da06f4c
Fix /map/embed/ view, was missing some JS constants
saschasommer Nov 6, 2024
523b368
Merge branch 'redesign-staging-payl' into release/test/redesign-relea…
saschasommer Nov 6, 2024
c7e9f31
Merge remote-tracking branch 'origin/feature/payments-tests' into rel…
saschasommer Nov 6, 2024
e28b723
v3: Fix "usecached" POST redirect logic redirecting error responses
saschasommer Nov 4, 2024
5c4c7e3
Fix /map/embed/ view, was missing some JS constants
saschasommer Nov 6, 2024
10d6a8d
Fix typo in new robots.txt
saschasommer Nov 6, 2024
6efefe2
Improve robots.txt (#498)
2e2a Oct 29, 2024
8fb08ea
Fix typo in new robots.txt
saschasommer Nov 6, 2024
8d0723e
v2.2.0: set version to 2.2.0
saschasommer Nov 6, 2024
43aabcc
Merge branch 'release/test/redesign-release-2.1' into redesign-dev
saschasommer Nov 6, 2024
0820506
v2.3.0: (dev) set dev version to 2.3.0
saschasommer Nov 6, 2024
f380078
Rework main menu links (#499)
saschasommer Nov 6, 2024
87a72f6
Set icon for main menu "Go To" element
2e2a Nov 4, 2024
1caaa18
Merge branch 'release/test/redesign-release-2.1' into redesign-dev
saschasommer Nov 6, 2024
4e64e53
Reduce logging amount in higher log levels
saschasommer Nov 7, 2024
5bbfc32
Adjust user match notification text (#500)
2e2a Nov 7, 2024
1587932
v3 navigation: changed the setting used for portal name for menus
saschasommer Nov 12, 2024
5dce04f
Merge branch 'feature/reduce-logging' into redesign-dev
saschasommer Nov 12, 2024
6c5807e
Fix NoneType comparator in events validator
saschasommer Nov 12, 2024
569b1a4
Merge branch 'release/test/redesign-release-2.1' into redesign-dev
saschasommer Nov 12, 2024
47d2ba3
Further reduce logging amounts in higher levels
saschasommer Nov 12, 2024
7cb7890
Merge branch 'release/test/redesign-release-2.1' into redesign-dev
saschasommer Nov 12, 2024
b6d77c6
v2.2.0: added version_history notes for release 2.2.0
saschasommer Nov 12, 2024
5c31818
Merge branch 'release/test/redesign-release-2.1' into redesign-dev
saschasommer Nov 12, 2024
4ab8165
Fix "recorded meetings" appsmenu link not shown to regular group members
saschasommer Nov 13, 2024
658fbec
Merge branch 'release/test/redesign-release-2.1' into redesign-dev
saschasommer Nov 13, 2024
44b238d
Fix swapped icons for groups/projects in userprofile detail
saschasommer Nov 13, 2024
1f20976
Merge branch 'release/test/redesign-release-2.1' into redesign-dev
saschasommer Nov 13, 2024
950a4f6
Set default LANGUAGE_CODE to "de".
saschasommer Nov 18, 2024
ec1e327
v2.2.1: Add v3 redirect exemptions for iCal feed URLs
saschasommer Nov 18, 2024
024c797
Fix password_reset failling on users with no cosinnus_profile
saschasommer Nov 19, 2024
21b63a7
Fix CodeMirror mde editors not refreshing inside a bootstrap tab
saschasommer Nov 19, 2024
2329190
Additional fixes for password_reset.
saschasommer Nov 20, 2024
53393a2
v3: add exemption for /captcha/ URL
saschasommer Nov 20, 2024
0a9704b
v2.2.2: Bump version for code mirror and password_reset fixes
saschasommer Nov 20, 2024
52b8370
RocketChat: change _get_unique_username logic to not fetch all RC users
saschasommer Nov 20, 2024
92da380
v2.2.3: Bump version for Rockechat user fetch optimization
saschasommer Nov 20, 2024
3f89d8a
Merge branch 'release/redesign-release-2.1-wechange' into redesign-dev
saschasommer Nov 21, 2024
7417ff2
cosinnus-v3-scoped.less: set visibility important
saschasommer Nov 21, 2024
728e58b
Fix exception in CosinnusPermanentRedirect admin
saschasommer Nov 21, 2024
c292cf9
v3: Remove v3 exemption for PAYL URLs
saschasommer Nov 21, 2024
52ab496
v3: Remove further v3 exemption for PAYL URLs
saschasommer Nov 21, 2024
0475f25
Cleanup unused housekeeping method
saschasommer Nov 25, 2024
422ed28
Activate Etherpad-on-delete hook to always delete pads on-server
saschasommer Nov 25, 2024
875348f
cosinnus-v3-scoped.less: set visibility important
saschasommer Nov 21, 2024
4fe42b6
Fix Todo create list button not appearing in v3
saschasommer Nov 25, 2024
e367b03
#347: v3 main content: add heuristic to parse number count badge labels
saschasommer Nov 25, 2024
da1e51c
#346: Fix Ethercalc downloads not working in v3
saschasommer Nov 25, 2024
89a1878
v3 main content: Replace BS5 'html.parser' with 'lxml' parser
saschasommer Nov 25, 2024
a4a5652
Merge branch 'release/test/redesign-release-2.1-wechange' into redesi…
saschasommer Nov 25, 2024
dbfdeef
Fixes https://git.wechange.de/gl/code/redesign/-/issues/347#note_129857
saschasommer Nov 27, 2024
caa89fa
v2.2.4: Bump version for v3 fixes and payments-periods
saschasommer Nov 27, 2024
8cd2464
Really activate Etherpad-on-delete hook to always delete pads on-server
saschasommer Nov 27, 2024
9efd302
Merge branch 'release/test/redesign-release-2.1' into redesign-dev
saschasommer Nov 27, 2024
f6a9b92
Fix BBB guest access being blocked on closed portals.
saschasommer Dec 3, 2024
39670bd
Hide groups with disabled public visibility on public user profiles
saschasommer Dec 3, 2024
dfa21cd
Fix signup "invite_token" not being considered in v3 api signup
saschasommer Dec 3, 2024
34f031b
Fix recruit-user email validation: strip non-ascii characters from end
saschasommer Dec 3, 2024
c03e69b
v2.2.5: Bump version and add version_history release notes
saschasommer Dec 3, 2024
9de96ee
Merge branch 'release/redesign-release-2.1' into redesign-dev
saschasommer Dec 3, 2024
451f963
v3 CSS: Remove legacy-content-main margin
saschasommer Dec 4, 2024
21b744c
Fix project create action in v3 spaces navigation API
2e2a Dec 4, 2024
652eb27
Refactor logout view method into CBV. Fixes logout cookie problems
saschasommer Dec 4, 2024
7c874cb
Refactor logout view method into CBV. Fixes logout cookie problems
saschasommer Dec 4, 2024
c423f5f
Remove leftnav for recorded meetings view
saschasommer Dec 4, 2024
c729218
Merge branch 'release/test/redesign-release-2.1' into redesign-dev
saschasommer Dec 4, 2024
a020cde
Add active markers for appsmenu list entries
saschasommer Dec 4, 2024
64c03a8
Merge branch 'release/test/redesign-release-2.1' into redesign-dev
saschasommer Dec 4, 2024
bc6cad8
#431: Improve redirect logic for approving/denying users
saschasommer Dec 5, 2024
b6d9cdf
Rocketchat: stringify log message error results
saschasommer Dec 5, 2024
1fc6969
Fix cloudfiles single-search view calling itself
saschasommer Dec 5, 2024
5ef3564
Don't allow to create multiple matches when selecting a user (#501)
2e2a Dec 5, 2024
126a00c
Minor: make log error a warning for failed attachable cloud searches
saschasommer Dec 5, 2024
cd32d54
v2.2.6: Logout refactor, v3 nav api changes and small fixes
saschasommer Dec 5, 2024
e86f338
v2.2.6: Merge branch 'release/test/redesign-release-2.1' into release…
saschasommer Dec 5, 2024
8a14f4d
#1829: Fix wrong search results for items "from my groups"
saschasommer Dec 9, 2024
75246ac
v3 main content: fix <nav> items that disappeared in main content
saschasommer Dec 9, 2024
76021b5
v2.2.7: Fixes other groups irrelevant search results appearing
saschasommer Dec 9, 2024
e0ea2af
Merge branch 'release/test/redesign-release-2.1' into release/redesig…
saschasommer Dec 9, 2024
31c263e
UserMatching selected user fixups (#502)
2e2a Dec 9, 2024
6e5626a
Merge branch 'release/redesign-release-2.1' into redesign-dev
saschasommer Dec 10, 2024
c334633
Allow late invitations for group invites
2e2a Dec 10, 2024
38dde0c
Exclude users with application in membership select2
2e2a Dec 10, 2024
a3a0c8c
Fix rocketchat login script for session logout
saschasommer Dec 11, 2024
e4e261c
Fix rocketchat login script for session logout: set timeout to 1000ms
saschasommer Dec 11, 2024
418a713
Merge branch 'redesign-dev' into release/test/redesign-release-2.1
saschasommer Dec 11, 2024
bb610ee
v2.2.8: Version bump for late invitations and matching notifications
saschasommer Dec 11, 2024
e9d6bcc
v3 LESS: fix missing margin under some forms
saschasommer Dec 11, 2024
0ce8014
v3 LESS: fix conference calendar widget color
saschasommer Dec 11, 2024
8d8e213
v3 LESS: fix missing margin under some forms
saschasommer Dec 11, 2024
7f73abf
Fabric: Add 'Custom_Script_Logged_In' to RC quick settings task
saschasommer Dec 11, 2024
1acaec6
Guest account v3 API adjustments (#503)
2e2a Dec 16, 2024
3659f75
Add guest login v3 API (#505)
2e2a Dec 18, 2024
7ebc9c3
Fix duplicate welcome emails (#506)
2e2a Dec 18, 2024
8b977f1
Set initial password v3 API (#507)
2e2a Dec 27, 2024
2b88905
#351: change icon for "visibility" to fa-eye (was fa-globe)
saschasommer Jan 8, 2025
2806f54
Minor: add captcha placeholder to old-signup form
saschasommer Dec 10, 2024
5e29714
Cherry pick v1.22.0 change for unique dynamic fields from main-redesign
saschasommer Jan 9, 2025
89961c5
Remove announcements level "debug"
saschasommer Jan 9, 2025
9338372
Add scheduled for deletion fields to group model
2e2a Jul 9, 2024
d2000b1
Add group deletion views
2e2a Jul 9, 2024
57854aa
Add messages to user dashboard
2e2a Jul 9, 2024
d0103b3
Add group deletion cron job
2e2a Jul 9, 2024
859ea10
Extend group deletion hooks
2e2a Jul 9, 2024
9f9e835
Add last-activity fields to group model
2e2a Jul 11, 2024
b36cfe3
Add last activity update cron job
2e2a Jul 11, 2024
74cee88
Add cron job for group notifications before deactivation
2e2a Jul 16, 2024
1cc8b2e
Add cron job to deactivate inactive groups for deletion
2e2a Jul 16, 2024
c1eaef3
Handle automatic deletion of inactive groups
2e2a Jul 17, 2024
79e45ef
Cleanup cron jobs
2e2a Jul 17, 2024
a992729
Add inactivity_notification_send_at field to user model
2e2a Jul 22, 2024
a08051f
Add cron jobs to notify and deactivate inactive users
2e2a Jul 22, 2024
2c6094b
Delete already inactive users
2e2a Jul 31, 2024
1d8bde3
Deletion fixups
2e2a Jul 31, 2024
dd0d29b
Add confirmation modal to group deletion view
2e2a Jul 31, 2024
55be15d
Add group admin filter for groups with scheduled deletion
2e2a Jul 31, 2024
8a41e93
Add hooks to reset deletion field on profile and group reactivation
2e2a Jul 31, 2024
1ace039
Install freezegun for time tests
2e2a Aug 1, 2024
249076e
Disable elastic thread during tests
2e2a Aug 1, 2024
69ddf48
Add deletion tests
2e2a Aug 1, 2024
c9b61a4
Move deletion functions to dedicated view files
2e2a Aug 1, 2024
3607a6e
Dont deactivate default user groups
2e2a Aug 1, 2024
b9ac810
Only admins are notified when an already deactivated group is deleted
2e2a Aug 1, 2024
3e3250d
Fix tense
2e2a Aug 28, 2024
5210865
Use query to compute the base-taggable-object last activity
2e2a Aug 28, 2024
e08f0df
Do not deactivate user when sending notification failed
2e2a Aug 28, 2024
69654b9
Handle users without profile during user deletion
2e2a Aug 28, 2024
c0bae2f
Add hint how to abort user or group deactivation
2e2a Aug 28, 2024
834fcb3
Fix paragraphs in deletion mails
2e2a Aug 28, 2024
dbda9d9
Add admin filter for inactivity notification sent
2e2a Aug 28, 2024
e825e20
Fixup deletion view imports
2e2a Aug 28, 2024
ce0cc0c
Add helper to get all default portal group slugs
2e2a Aug 28, 2024
7548d7f
Ignore default portal groups for activity update and deletion
2e2a Aug 28, 2024
b3fb820
Remove delete and deactive buttons for default portal groups
2e2a Aug 28, 2024
a6551ef
Improve group deactivation mails
2e2a Aug 29, 2024
02466ce
Fix cron job returning message
2e2a Aug 29, 2024
d057840
Make update activity cron dry
2e2a Aug 29, 2024
ec9addb
Run deletion cron jobs daily
2e2a Aug 29, 2024
87b6065
Improve notification assertion
2e2a Aug 29, 2024
b895ea4
Delete pads during group deletion
2e2a Sep 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion announcements/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class Announcement(models.Model):
LEVEL_WARNING = 'warning'
LEVEL_ERROR = 'error'
LEVEL_CHOICES = (
(LEVEL_DEBUG, _('Debug')),
(LEVEL_INFO, _('Info')),
(LEVEL_SUCCESS, _('Success')),
(LEVEL_WARNING, _('Warning')),
Expand Down
2 changes: 1 addition & 1 deletion cosinnus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from __future__ import absolute_import, unicode_literals

# The cosinnus version
VERSION = '2.0.0'
VERSION = '2.2.8'

celery_app = None

Expand Down
211 changes: 203 additions & 8 deletions cosinnus/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
from django.utils.translation import gettext_lazy as _
from django_reverse_admin import ReverseModelAdmin

from cosinnus.backends import elastic_threading_disabled
from cosinnus.conf import settings
from cosinnus.core import signals
from cosinnus.core.registries import attached_object_registry
from cosinnus.forms.widgets import PrettyJSONWidget
from cosinnus.models.cms import CosinnusMicropage
from cosinnus.models.conference import CosinnusConferencePremiumCapacityInfo, CosinnusConferenceSettings
Expand Down Expand Up @@ -56,6 +58,7 @@
from cosinnus.models.widget import WidgetConfig
from cosinnus.utils.dashboard import create_initial_group_widgets
from cosinnus.utils.group import get_cosinnus_group_model
from cosinnus.utils.permissions import check_user_superuser
from cosinnus.utils.urls import group_aware_reverse


Expand All @@ -82,9 +85,11 @@ def admin_log_action(user, instance, message):

class SingleDeleteActionMixin(object):
def get_actions(self, request):
self.actions.append('really_delete_selected')
# replace the django delete-selected action with ours
self.actions = list(set(list(self.actions) + ['really_delete_selected']))
actions = super(SingleDeleteActionMixin, self).get_actions(request)
del actions['delete_selected']
if 'delete_selected' in actions:
del actions['delete_selected']
return actions

def really_delete_selected(self, request, queryset):
Expand Down Expand Up @@ -307,6 +312,48 @@ class MembershipInline(admin.StackedInline):
extra = 0


class ProjectScheduledForDeletionAtFilter(admin.SimpleListFilter):
"""Will show groups that are scheduled for deletion (or not)"""

title = _('Scheduled for Deletion?')

# Parameter for the filter that will be used in the URL query.
parameter_name = 'groupscheduledfordeletion'

def lookups(self, request, model_admin):
return (
('yes', _('Yes')),
('no', _('No')),
)

def queryset(self, request, queryset):
if self.value() == 'yes':
return queryset.exclude(scheduled_for_deletion_at__exact=None)
if self.value() == 'no':
return queryset.filter(scheduled_for_deletion_at__exact=None)


class ProjectInactivityNotificationSentFilter(admin.SimpleListFilter):
"""Will show projects where notification were sent about the pending deletion due to inactivity."""

title = _('Inactivity Notification Sent?')

# Parameter for the filter that will be used in the URL query.
parameter_name = 'groupinactivitynotificationsent'

def lookups(self, request, model_admin):
return (
('yes', _('Yes')),
('no', _('No')),
)

def queryset(self, request, queryset):
if self.value() == 'yes':
return queryset.exclude(inactivity_notification_sent_at__exact=None)
if self.value() == 'no':
return queryset.filter(inactivity_notification_sent_at__exact=None)


class CosinnusProjectAdmin(admin.ModelAdmin):
actions = [
'convert_to_society',
Expand All @@ -333,6 +380,8 @@ class CosinnusProjectAdmin(admin.ModelAdmin):
'portal',
'public',
'is_active',
ProjectScheduledForDeletionAtFilter,
ProjectInactivityNotificationSentFilter,
)
search_fields = (
'name',
Expand All @@ -345,12 +394,15 @@ class CosinnusProjectAdmin(admin.ModelAdmin):
'last_modified',
'is_premium_currently',
'attached_objects',
'last_activity',
'inactivity_notification_sent_at',
]
raw_id_fields = ('parent',)
exclude = [
'is_conference',
]
inlines = [CosinnusConferenceSettingsInline]
if settings.COSINNUS_CONFERENCES_ENABLED:
inlines = [CosinnusConferenceSettingsInline]

ALL_TYPES_CLASSES = [CosinnusProject, CosinnusSociety, CosinnusConference]

Expand Down Expand Up @@ -685,7 +737,8 @@ class CosinnusPortalAdmin(admin.ModelAdmin):
'top_color',
'bottom_color',
)
inlines = [CosinnusConferenceSettingsInline, CosinnusConferencePremiumCapacityInfoInline]
if settings.COSINNUS_CONFERENCES_ENABLED or settings.COSINNUS_BBB_ENABLE_GROUP_AND_EVENT_BBB_ROOMS:
inlines = [CosinnusConferenceSettingsInline, CosinnusConferencePremiumCapacityInfoInline]

def queryset(self, request):
"""Allow portals to be accessed only by superusers and Portal-Admins"""
Expand Down Expand Up @@ -748,6 +801,7 @@ class UserProfileInline(admin.StackedInline):
'deletion_triggered_by_self',
'_is_guest',
'guest_access_object',
'inactivity_notification_sent_at',
)
show_change_link = True
view_on_site = False
Expand Down Expand Up @@ -880,6 +934,30 @@ def queryset(self, request, queryset):
return queryset.filter(cosinnus_profile__scheduled_for_deletion_at__exact=None)


_useradmin_excluded_list_filter = ['groups', 'is_staff']


class UserInactivityNotificationSentFilter(admin.SimpleListFilter):
"""Will show users that were notified on about the pending deletion due to inactivity."""

title = _('Inactivity Notification Sent?')

# Parameter for the filter that will be used in the URL query.
parameter_name = 'usersinactivitynotificationsent'

def lookups(self, request, model_admin):
return (
('yes', _('Yes')),
('no', _('No')),
)

def queryset(self, request, queryset):
if self.value() == 'yes':
return queryset.exclude(cosinnus_profile__inactivity_notification_sent_at__exact=None)
if self.value() == 'no':
return queryset.filter(cosinnus_profile__inactivity_notification_sent_at__exact=None)


class UserAdmin(DjangoUserAdmin):
fieldsets = (
(
Expand Down Expand Up @@ -910,6 +988,8 @@ class UserAdmin(DjangoUserAdmin):
actions = [
'deactivate_users',
'reactivate_users',
'deactivate_spam_users',
'logout_users',
'export_as_csv',
'log_in_as_user',
'refresh_group_memberships',
Expand All @@ -924,6 +1004,7 @@ class UserAdmin(DjangoUserAdmin):
if settings.COSINNUS_CLOUD_ENABLED:
actions += [
'force_redo_cloud_user_room_memberships',
'make_user_cloud_admin',
]
list_display = (
'email',
Expand All @@ -939,11 +1020,15 @@ class UserAdmin(DjangoUserAdmin):
'is_staff',
'scheduled_for_deletion_at',
)
list_filter = list(DjangoUserAdmin.list_filter) + [
list_filter = [
field for field in list(DjangoUserAdmin.list_filter) if field not in _useradmin_excluded_list_filter
] + [
'date_joined',
UserHasLoggedInFilter,
UserToSAcceptedFilter,
UserScheduledForDeletionAtFilter,
EmailVerifiedFilter,
UserScheduledForDeletionAtFilter,
UserInactivityNotificationSentFilter,
IsGuestFilter,
]

Expand Down Expand Up @@ -991,10 +1076,13 @@ def has_delete_permission(self, request, obj=None):
return False

def deactivate_users(self, request, queryset):
from cosinnus.views.profile import deactivate_user_and_mark_for_deletion
from cosinnus.views.profile_deletion import deactivate_user_and_mark_for_deletion

count = 0
for user in queryset:
if check_user_superuser(user):
self.message_user(request, 'Skipping deactivating a user that is an admin! Careful who you select!')
continue
deactivate_user_and_mark_for_deletion(user)
count += 1
message = _(
Expand All @@ -1005,7 +1093,7 @@ def deactivate_users(self, request, queryset):
deactivate_users.short_description = _('DEACTIVATE user accounts and DELETE them after 30 days')

def reactivate_users(self, request, queryset):
from cosinnus.views.profile import reactivate_user
from cosinnus.views.profile_deletion import reactivate_user

count = 0
for user in queryset:
Expand All @@ -1016,6 +1104,101 @@ def reactivate_users(self, request, queryset):

reactivate_users.short_description = _('Reactivate user accounts')

def deactivate_spam_users(self, request, queryset):
"""For use on spam users that admins want to completely boot off the platform.
Will deactivate and mark for deletion the user, deactivate all groups they are the only admin of,
and hide all content from other groups and non-group-content ('visibility: only me')."""
# TODO: delete this function and replace it with the `get_registered_base_taggable_models`
# once the changes from 'dsgvo-deletion' PR are in!
from django.apps import apps

from cosinnus.models.tagged import BaseTaggableObjectModel
from cosinnus.views.profile import deactivate_user_and_mark_for_deletion

def _get_registered_base_taggable_models():
base_taggable_object_models = []
for full_model_name in attached_object_registry:
app_label, model_name = full_model_name.split('.')
model = apps.get_model(app_label, model_name)
if issubclass(model, BaseTaggableObjectModel):
base_taggable_object_models.append(model)
return base_taggable_object_models

models_to_hide_content = _get_registered_base_taggable_models() + [CosinnusIdea]

# TODO: move this function to views/profile_deletion.py once the changes from 'dsgvo-deletion' PR are in!
from cosinnus.models.tagged import BaseTagObject

def _deactivate_or_hide_all_user_content(user):
"""Deactivate all groups a user is the only admin of,
and hide all content from other groups and non-group-content ('visibility: only me').
@return: returns a tuple of ints (num_deactivated_groups, hidden_content)"""
deactivated_groups = 0
hidden_content = 0
for group in CosinnusGroup.objects.get_for_user(user):
admins = CosinnusGroupMembership.objects.get_admins(group=group)
if [user.pk] == admins:
# user is the only admin of the group, deactivate it
group.is_active = False
group.save()
# remove group from search index
group.remove_index()
deactivated_groups += 1
# taggable objects (notes, events, ...) and ideas
for model_to_hide in models_to_hide_content:
for object_to_hide in model_to_hide.objects.filter(creator=user):
# set visibility to user-only
if hasattr(object_to_hide, 'media_tag') and getattr(object_to_hide, 'media_tag', None):
media_tag = object_to_hide.media_tag
if not media_tag.visibility == BaseTagObject.VISIBILITY_USER:
media_tag.visibility = BaseTagObject.VISIBILITY_USER
media_tag.save()
hidden_content += 1
# remove object from search index (always, just to be sure)
object_to_hide.remove_index()
return deactivated_groups, hidden_content

user_count = 0
deactivated_groups_count = 0
hidden_content_count = 0
for user in queryset:
if check_user_superuser(user):
self.message_user(request, 'Skipping banning a user that is an admin! Careful who you select!')
continue
_group_count, _hidden_count = _deactivate_or_hide_all_user_content(user)
with elastic_threading_disabled():
deactivate_user_and_mark_for_deletion(user)
if hasattr(user, 'cosinnus_profile') and getattr(user, 'cosinnus_profile', None):
profile = user.cosinnus_profile
profile.remove_index()
deactivated_groups_count += _group_count
hidden_content_count += _hidden_count
user_count += 1
message = _(
'%(user_count)d User account(s) were deactivated successfully. \n'
'%(deactivated_groups_count)d groups and projects have been deactivated. \n'
'%(hidden_content_count)d contents have been set invisible. \n'
'The user(s) will be deleted after 30 days.'
) % {
'user_count': user_count,
'deactivated_groups_count': deactivated_groups_count,
'hidden_content_count': hidden_content_count,
}
self.message_user(request, message)

deactivate_spam_users.short_description = _('(SPAM) DEACTIVATE user and their contents (user deletion in 30d)')

def logout_users(self, request, queryset):
count = 0
for user in queryset:
if hasattr(user, 'cosinnus_profile') and user.cosinnus_profile:
user.cosinnus_profile.force_logout_user()
count += 1
message = _('%(count)d Users were logged out.') % {'count': count}
self.message_user(request, message)

logout_users.short_description = _('Logout users')

def log_in_as_user(self, request, queryset):
user = queryset[0]
user.backend = 'cosinnus.backends.EmailAuthBackend'
Expand Down Expand Up @@ -1116,6 +1299,18 @@ def force_redo_cloud_user_room_memberships(self, request, queryset):
'Nextcloud: Fix missing Nextcloud folder membership for users'
)

def make_user_cloud_admin(self, request, queryset):
from cosinnus_cloud.hooks import user_promoted_to_superuser

count = 0
for user in queryset:
user_promoted_to_superuser(None, user)
count += 1
message = _('%d Users were made Nextcloud admins.') % count
self.message_user(request, message)

make_user_cloud_admin.short_description = _('Nextcloud: Make user Nextcloud admin')


admin.site.unregister(USER_MODEL)
admin.site.register(USER_MODEL, UserAdmin)
Expand Down
10 changes: 8 additions & 2 deletions cosinnus/api/serializers/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@
from django.templatetags.static import static
from rest_framework import serializers

from cosinnus.conf import settings
from cosinnus.models import CosinnusPortal

__all__ = ('PortalSettingsSerializer',)


class PortalSettingsSerializer(serializers.ModelSerializer):

display_name = serializers.SerializerMethodField()
logo_image = serializers.SerializerMethodField()

class Meta(object):
model = CosinnusPortal
fields = ('name', 'background_image', 'logo_image', 'top_color', 'bottom_color', 'extra_css')

fields = ('name', 'display_name', 'background_image', 'logo_image', 'top_color', 'bottom_color', 'extra_css')

def get_display_name(self, obj):
return settings.COSINNUS_BASE_PAGE_TITLE_TRANS

def get_logo_image(self, obj):
return static('img/v2_navbar_brand.png')
2 changes: 1 addition & 1 deletion cosinnus/api/serializers/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class UserSerializer(serializers.ModelSerializer):

class Meta(object):
model = User
fields = ('id', 'username', 'first_name', 'last_name', 'profile')
fields = ('id', 'username', 'first_name', 'last_name', 'is_guest', 'profile')


class UserSerializerWithToken(TokenObtainPairSerializer):
Expand Down
2 changes: 1 addition & 1 deletion cosinnus/api/views/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class HeaderView(APIView):
"""

def get(self, request):
context = Context({'request': request})
context = Context({'request': request, 'is_api_request': True})
return Response(
{
'html': cosinnus_menu_v2(context, request=request),
Expand Down
Loading