While enhancing cypress tests for the group membership panel for non-manager users, I am stopped by an unauthorized problem.
Unfortunatly there are no cypress tests in Volto with non-manager users to get insight how to fix. If you ever used cy.autologin
for non-manager users in your add-on, please share your insights.
describe('User Group Membership Control Panel test for non-manager', () => {
beforeEach(() => {
init();
cy.createUser({
username: 'siteadmin',
fullname: 'Sven Siteadministrator',
roles: ['Site Administrator'],
});
cy.autologin('siteadmin', 'password');
});
Now with role Site Administrator
the user should be granted the right to use the group membership panel, which is at least fetching Plone restapi @users and @groups.