We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
events not editable for groupmembers
group member CAN edit a project but CANNOT an event related to the project. 403 error.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `meinberlin/apps/offlineevents/rules.py`
Content:
```
1 import rules
2 from rules.predicates import is_superuser
3 
4 from adhocracy4.modules import predicates as module_predicates
5 from adhocracy4.organisations.predicates import is_initiator
6 from adhocracy4.projects.predicates import is_moderator
7 
8 rules.add_perm(
9     'meinberlin_offlineevents.list_offlineevent',
10     is_superuser | is_initiator | is_moderator
11 )
12 
13 rules.add_perm(
14     'meinberlin_offlineevents.view_offlineevent',
15     module_predicates.is_allowed_view_item
16 )
17 
18 rules.add_perm(
19     'meinberlin_offlineevents.add_offlineevent',
20     is_superuser | is_initiator | is_moderator
21 )
22 
23 rules.add_perm(
24     'meinberlin_offlineevents.change_offlineevent',
25     is_superuser | is_initiator | is_moderator
26 )
27
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/meinberlin/apps/offlineevents/rules.py b/meinberlin/apps/offlineevents/rules.py
--- a/meinberlin/apps/offlineevents/rules.py
+++ b/meinberlin/apps/offlineevents/rules.py
@@ -4,10 +4,11 @@
 from adhocracy4.modules import predicates as module_predicates
 from adhocracy4.organisations.predicates import is_initiator
 from adhocracy4.projects.predicates import is_moderator
+from adhocracy4.projects.predicates import is_prj_group_member
 
 rules.add_perm(
     'meinberlin_offlineevents.list_offlineevent',
-    is_superuser | is_initiator | is_moderator
+    is_superuser | is_initiator | is_moderator | is_prj_group_member
 )
 
 rules.add_perm(
@@ -17,10 +18,10 @@
 
 rules.add_perm(
     'meinberlin_offlineevents.add_offlineevent',
-    is_superuser | is_initiator | is_moderator
+    is_superuser | is_initiator | is_moderator | is_prj_group_member
 )
 
 rules.add_perm(
     'meinberlin_offlineevents.change_offlineevent',
-    is_superuser | is_initiator | is_moderator
+    is_superuser | is_initiator | is_moderator | is_prj_group_member
 )

{"golden_diff": "diff --git a/meinberlin/apps/offlineevents/rules.py b/meinberlin/apps/offlineevents/rules.py\n--- a/meinberlin/apps/offlineevents/rules.py\n+++ b/meinberlin/apps/offlineevents/rules.py\n@@ -4,10 +4,11 @@\n from adhocracy4.modules import predicates as module_predicates\n from adhocracy4.organisations.predicates import is_initiator\n from adhocracy4.projects.predicates import is_moderator\n+from adhocracy4.projects.predicates import is_prj_group_member\n \n rules.add_perm(\n     'meinberlin_offlineevents.list_offlineevent',\n-    is_superuser | is_initiator | is_moderator\n+    is_superuser | is_initiator | is_moderator | is_prj_group_member\n )\n \n rules.add_perm(\n@@ -17,10 +18,10 @@\n \n rules.add_perm(\n     'meinberlin_offlineevents.add_offlineevent',\n-    is_superuser | is_initiator | is_moderator\n+    is_superuser | is_initiator | is_moderator | is_prj_group_member\n )\n \n rules.add_perm(\n     'meinberlin_offlineevents.change_offlineevent',\n-    is_superuser | is_initiator | is_moderator\n+    is_superuser | is_initiator | is_moderator | is_prj_group_member\n )\n", "issue": "events not editable for groupmembers\ngroup member CAN edit a project but CANNOT an event related to the project. 403 error.\n", "before_files": [{"content": "import rules\nfrom rules.predicates import is_superuser\n\nfrom adhocracy4.modules import predicates as module_predicates\nfrom adhocracy4.organisations.predicates import is_initiator\nfrom adhocracy4.projects.predicates import is_moderator\n\nrules.add_perm(\n    'meinberlin_offlineevents.list_offlineevent',\n    is_superuser | is_initiator | is_moderator\n)\n\nrules.add_perm(\n    'meinberlin_offlineevents.view_offlineevent',\n    module_predicates.is_allowed_view_item\n)\n\nrules.add_perm(\n    'meinberlin_offlineevents.add_offlineevent',\n    is_superuser | is_initiator | is_moderator\n)\n\nrules.add_perm(\n    'meinberlin_offlineevents.change_offlineevent',\n    is_superuser | is_initiator | is_moderator\n)\n", "path": "meinberlin/apps/offlineevents/rules.py"}], "after_files": [{"content": "import rules\nfrom rules.predicates import is_superuser\n\nfrom adhocracy4.modules import predicates as module_predicates\nfrom adhocracy4.organisations.predicates import is_initiator\nfrom adhocracy4.projects.predicates import is_moderator\nfrom adhocracy4.projects.predicates import is_prj_group_member\n\nrules.add_perm(\n    'meinberlin_offlineevents.list_offlineevent',\n    is_superuser | is_initiator | is_moderator | is_prj_group_member\n)\n\nrules.add_perm(\n    'meinberlin_offlineevents.view_offlineevent',\n    module_predicates.is_allowed_view_item\n)\n\nrules.add_perm(\n    'meinberlin_offlineevents.add_offlineevent',\n    is_superuser | is_initiator | is_moderator | is_prj_group_member\n)\n\nrules.add_perm(\n    'meinberlin_offlineevents.change_offlineevent',\n    is_superuser | is_initiator | is_moderator | is_prj_group_member\n)\n", "path": "meinberlin/apps/offlineevents/rules.py"}]}