diff --git a/src/appBase b/src/appBase index 01aee917..7ae906d6 160000 --- a/src/appBase +++ b/src/appBase @@ -1 +1 @@ -Subproject commit 01aee91781d56437702b864fa78f6377fc5d5922 +Subproject commit 7ae906d6f6c5e31e1d6325f4c225ca48063ec097 diff --git a/src/people/components/Household.tsx b/src/people/components/Household.tsx index 8076856a..5527f0d9 100644 --- a/src/people/components/Household.tsx +++ b/src/people/components/Household.tsx @@ -31,7 +31,7 @@ export const Household: React.FC = (props) => { ApiHelper.get("/people/household/" + household.id, "MembershipApi").then(data => setMembers(data)); } } - const getEditFunction = () => (UserHelper.checkAccess(Permissions.membershipApi.households.edit)) ? handleEdit : undefined + const getEditFunction = () => (UserHelper.checkAccess(Permissions.membershipApi.people.edit)) ? handleEdit : undefined React.useEffect(loadData, [props.person]); React.useEffect(() => { setPhoto(PersonHelper.getPhotoUrl(props.person)) diff --git a/src/settings/components/RoleMembers.tsx b/src/settings/components/RoleMembers.tsx index 28615ef2..9776e328 100644 --- a/src/settings/components/RoleMembers.tsx +++ b/src/settings/components/RoleMembers.tsx @@ -31,7 +31,7 @@ export const RoleMembers: React.FC = (props) => { } const getRows = () => { - let canEdit = UserHelper.checkAccess(Permissions.membershipApi.roleMembers.edit); + let canEdit = UserHelper.checkAccess(Permissions.membershipApi.roles.edit); let rows: JSX.Element[] = []; if (isRoleEveryone) { rows.push(This role applies to all the members of the church.) diff --git a/src/settings/components/Roles.tsx b/src/settings/components/Roles.tsx index 39fcfb5a..7b6d8353 100644 --- a/src/settings/components/Roles.tsx +++ b/src/settings/components/Roles.tsx @@ -35,7 +35,6 @@ export const Roles: React.FC = ({ selectRoleId, selectedRoleId, church }) { name: "Church Staff", description: "Can edit most data in Chums.org, including people, groups, attendance and forms.", permissions: [ Permissions.membershipApi.people.view, Permissions.membershipApi.people.edit, - Permissions.membershipApi.households.edit, Permissions.membershipApi.groups.edit, Permissions.membershipApi.groupMembers.view, Permissions.membershipApi.groupMembers.edit, @@ -44,15 +43,11 @@ export const Roles: React.FC = ({ selectRoleId, selectedRoleId, church }) Permissions.attendanceApi.attendance.edit, Permissions.attendanceApi.attendance.view, Permissions.attendanceApi.services.edit, - Permissions.attendanceApi.settings.edit, ]}, { name: "Content Admin", description: "Can edit website content, mobile content and sermons.", permissions: [ Permissions.contentApi.chat.host, Permissions.contentApi.content.edit, - Permissions.contentApi.links.edit, - Permissions.contentApi.pages.edit, - Permissions.contentApi.settings.edit, - Permissions.contentApi.streamingServices.edit, + Permissions.contentApi.streamingServices.edit ]}, { name: "Lessons Admin", description: "Can set up classrooms and schedule lessons on Lessons.church.", permissions: [ { api: "LessonsApi", contentType:"Schedules", permission: "Edit" } @@ -110,11 +105,11 @@ export const Roles: React.FC = ({ selectRoleId, selectedRoleId, church }) const sortedRoles = [...roles].sort((a, b) => a.name > b.name ? 1 : -1); const canEdit = ( UserHelper.checkAccess(Permissions.membershipApi.roles.edit) - && UserHelper.checkAccess(Permissions.membershipApi.users.edit) + && UserHelper.checkAccess(Permissions.membershipApi.roles.edit) && UserHelper.checkAccess(Permissions.membershipApi.people.view) ); - if (UserHelper.checkAccess(Permissions.membershipApi.rolePermissions.edit)) { + if (UserHelper.checkAccess(Permissions.membershipApi.roles.edit)) { result.push( (Everyone)