All my dashboard pages broke and I narrowed down the problem. Logging into the dashboard isn’t granting member or admin privileges for .jsw functions. I am able to work around by forcing a log in on my site itself.
to reproduce on a new site:
I made testPermissions.jsw - each function has the corresponding permission assigned.
export function anyone() {
return "Anyone Permission Successsful";
}
export function member() {
return "member Permission Successsful";
}
export function admin() {
return "admin Permission Successsful";
}
and made a dashboard page:
import { anyone } from 'backend/testPermissions';
import { member } from 'backend/testPermissions';
import { admin } from 'backend/testPermissions';
$w.onReady(function () {
});
export function test1_click(event) {
$w('#text1').text = "Testing Anyone...";
anyone()
.then((results) => {
$w('#text1').text = results;
});
}
export function test2_click(event) {
$w('#text1').text = "Testing Members...";
member()
.then((results) => {
$w('#text1').text = results;
});
}
export function test3_click(event) {
$w('#text1').text = "Testing Admins...";
admin()
.then((results) => {
$w('#text1').text = results;
});
}
Only the anyone function will be successfully called if I log into the dashboard.
If I force a log-in on my site by navigating directly to my dashboard page ( Public Code Test ) all three functions will work.
here is a link to my editor on a throwaway test site if any wix people care to investigate: https://editor.wix.com/html/editor/web/renderer/edit/f0b4a7d8-a87b-48d6-9cfd-b97f170c8a1a?metaSiteId=f8660565-f6d2-4d9a-8f70-746f9cde398e