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

Respect config option for adding series ACL to new event #321

Merged

Conversation

Arnei
Copy link
Member

@Arnei Arnei commented Apr 5, 2024

The backend configuration file org.opencastproject.organization-mh_default_org.cfg has a config option called admin.init.event.acl.with.series.acl. It determines whether the ACL of a new event is initialized with the ACL of its series, and true per default. We were not respecting this config option at all. This PR changes that.

The backend configuration file `org.opencastproject.organization-mh_default_org.cfg` has a config option called `admin.init.event.acl.with.series.acl`. It determines whether the ACL of a new event is initialized with the ACL of its series, and true per default. We were not respecting this config option at all. This PR changes that.
@Arnei Arnei added the type:bug Something isn't working label Apr 5, 2024
@Arnei
Copy link
Member Author

Arnei commented Apr 5, 2024

@mwuttke from my understanding this should fix #316 (for real this time), but I don't have a Moodle around to test it.

@mwuttke
Copy link
Contributor

mwuttke commented Apr 8, 2024

@Arnei, thanks for the hint. Please coud you explain me how I can test this patch respectively how can I build the opencast-admin-interface jar file by my self? I was not able to compile it with the build-release.sh script. There were some error messages.

@Arnei
Copy link
Member Author

Arnei commented Apr 8, 2024

Did you maybe not run the script from the .github folder? Otherwise could you post the logs?

For quick testing, I basically do what is described in the "Quickstart" section of the project ReadMe. But instead of running the proxy server against http://stable.opencast.org I run it against my own Opencast.
Alternatively, i follow "How to cut a release for Opencast", but push the tag to my own fork of this repo to create the release on my fork (and don't actually submit a pull request, just change the interface.url in the pom.xml).

@mwuttke
Copy link
Contributor

mwuttke commented Apr 8, 2024

@Arnei, thank you for your explanations. But it would be easiest for me to test your PR if I had a step-by-step guide on how to create a corresponding jar file for opencast-admin-interface to store it in our opencast test system (version 15.3). I was not able to run the proxy server against our test system.

@mwuttke
Copy link
Contributor

mwuttke commented Apr 9, 2024

Now I am able to run the proxy server against our test system. The node.js & npm version on the local host was to old. ;-)
But now the proxy-server allways crashs at the same point: When I try to configure "Schedule multiple events" and try to select a workflow the proxy-server crashs reproducible, as it does not find any workflows. So I am not able to test your patch to see if the ACLs of the series are set correctly. I am sorry.

@Arnei
Copy link
Member Author

Arnei commented Apr 10, 2024

Thanks for trying to test anyway, and sorry for not getting back to you on more detailed steps on how to test.

As for the proxy server crashing on workflow selection, I cannot reproduce that even if I intentionally configure no workflows to be available. Might be worth a new bug report issue?

@mwuttke
Copy link
Contributor

mwuttke commented Apr 10, 2024

With the correctly compiled jar file for the opencast-admin-ui-interface this patch works for us. Thanks @Arnei for your help.

@mwuttke
Copy link
Contributor

mwuttke commented Apr 11, 2024

One more addition to the PR: If you create a new event with a series - e.g. for a Moodle course - in our understanding, only the roles of the series should appear in the Access policy tab plus ROLE_GROUP_MH_DEFAULT_ORG_EXTERNAL_APPLICATIONS and ROLE_ADMIN, each with the corresponding read and write permissions.
Please see the difference between the old Admin UI:
Bildschirmfoto vom 2024-04-11 09-08-28
and the new Admin UI:
Bildschirmfoto vom 2024-04-11 09-04-05

Previously we were combining existing roles
with the series roles. But apparently the series
roles should just overwrite all other roles.
This changes it to that.
Copy link
Member

@KatrinIhler KatrinIhler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works in one direction, but not in the other for me:

When turning off the initialization with the series ACL in Opencast, the ACL tab still shows the roles of the series on event creation even after reloading the page. In that case, only the role of the current user should be shown.

Copy link
Contributor

github-actions bot commented May 3, 2024

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@Arnei
Copy link
Member Author

Arnei commented May 27, 2024

Sorry @mwuttke, but I am unable to reproduce your problem without a Moodle instance of my own. If I create an event in the admin UI, ROLE_USER_[...] is correctly overwritten by the series roles, meaning it does not appear in the ui.

@Arnei
Copy link
Member Author

Arnei commented May 27, 2024

@KatrinIhler , I am also unable to reproduce your problem. After turning off initialization with series ACL, only the role of the current users is shown to me, so for me it is working as you expected.

@KatrinIhler
Copy link
Member

Tried to test this again but can't pick a series for a new event (or edit any other metadata field after the title). u_u I'm using Firefox, neither the proxy nor the static data works. In the console I have

Warning: Failed prop type: Invalid prop `connector` of type `boolean` supplied to `ForwardRef(Stepper)`, expected a single ReactElement.
Stepper@http://localhost:3000/admin-ui/static/js/bundle.js:97425:82
WizardStepperEvent@http://localhost:3000/admin-ui/static/js/bundle.js:45902:28
Formik@http://localhost:3000/admin-ui/static/js/bundle.js:158455:28
NewEventWizard@http://localhost:3000/admin-ui/static/js/bundle.js:33479:24
section
NewResourceModal@http://localhost:3000/admin-ui/static/js/bundle.js:38331:26
section
Events@http://localhost:3000/admin-ui/static/js/bundle.js:12379:16
ConnectFunction@http://localhost:3000/admin-ui/static/js/bundle.js:223383:68
RenderedRoute@http://localhost:3000/admin-ui/static/js/bundle.js:227662:7
Routes@http://localhost:3000/admin-ui/static/js/bundle.js:228352:7
Router@http://localhost:3000/admin-ui/static/js/bundle.js:228291:7
HashRouter@http://localhost:3000/admin-ui/static/js/bundle.js:226303:7
App@http://localhost:3000/admin-ui/static/js/bundle.js:8377:75
BoundHotkeysProxyProviderProvider@http://localhost:3000/admin-ui/static/js/bundle.js:222573:19
HotkeysProvider@http://localhost:3000/admin-ui/static/js/bundle.js:222603:31
LocalizationProvider@http://localhost:3000/admin-ui/static/js/bundle.js:113760:9
ThemeProvider@http://localhost:3000/admin-ui/static/js/bundle.js:101927:7
ThemeProvider@http://localhost:3000/admin-ui/static/js/bundle.js:103119:7
ThemeProvider@http://localhost:3000/admin-ui/static/js/bundle.js:100507:9
PersistGate@http://localhost:3000/admin-ui/static/js/bundle.js:239570:20
Provider@http://localhost:3000/admin-ui/static/js/bundle.js:223125:15

which may or may not be related?

@Arnei
Copy link
Member Author

Arnei commented May 28, 2024

That was caused by another PR, should be fixed now.

@mwuttke
Copy link
Contributor

mwuttke commented Jun 4, 2024

That was caused by another PR, should be fixed now.

By which PR this issue is fixed?

@Arnei
Copy link
Member Author

Arnei commented Jun 4, 2024

I thiiiink this one #309. To be clear, I was specifically referring to the issue Katrin was having.

@mwuttke
Copy link
Contributor

mwuttke commented Jun 4, 2024

I know. Is there anything I can test right now?

@Arnei
Copy link
Member Author

Arnei commented Jun 4, 2024

Probably not. I have done nothing to fix the issue with Moodle you mentioned, so I don't think that is fixed.

Copy link
Member

@KatrinIhler KatrinIhler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works now, don't know what my earlier problem was. Can't speak to whether this fixes Michael's problem, though.

@KatrinIhler KatrinIhler merged commit 3580cd9 into opencast:main Jun 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants