Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/POST_INSTALL_STEPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ The following permissions are needed for all Member Matters payment features to
* "THEME_SWIPE_URL" - a URL to hit on each door/interlock swipe that can trigger a theme song played over your intercom system, or something else.
* "ENABLE_THEME_SWIPE" - enable the theme song swipe webhook.

### Members Settings
* "ENABLE_LAST_SEEN_PAGE" - shows the last seen listing on members pages when enabled

### Door Bump API
* "ENABLE_DOOR_BUMP_API" - Enable an API endpoint that 'bumps' (temporarily unlocks) a door for third party integration.
* "DOOR_BUMP_API_KEY" - The API key used to authenticate requests to the door bump API endpoint. MUST be set or the endpoint is automatically disabled.
Expand Down
1 change: 1 addition & 0 deletions memberportal/api_general/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def get(self, request):
"footer": config.SMS_FOOTER,
},
"enableStatsPage": config.ENABLE_STATS_PAGE,
"enableLastSeenPage": config.ENABLE_LAST_SEEN_PAGE or request.user.is_admin,
}

keys = {"stripePublishableKey": config.STRIPE_PUBLISHABLE_KEY}
Expand Down
2 changes: 1 addition & 1 deletion memberportal/api_member_tools/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Lastseen(APIView):
get: This method returns when each user was last seen (ie when they last swiped).
"""

permission_classes = (permissions.IsAuthenticated,)
permission_classes = (permissions.IsAuthenticated and (config.ENABLE_LAST_SEEN_PAGE or permissions.IsAdminUser),)
queryset = Profile.objects.filter(state="active").order_by("-last_seen")

def get(self, request):
Expand Down
5 changes: 5 additions & 0 deletions memberportal/membermatters/constance_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@
365,
"The maximum number of days to show on the stats page.",
),
"ENABLE_LAST_SEEN_PAGE": (
True,
"Enable the Last Seen page that shows member last seen data.",
),
}

CONSTANCE_CONFIG_FIELDSETS = OrderedDict(
Expand Down Expand Up @@ -422,6 +426,7 @@
"ENABLE_PORTAL_SITE_SIGN_IN",
"ENABLE_PORTAL_MEMBERS_ON_SITE",
"ENABLE_DOOR_BUMP_API",
"ENABLE_LAST_SEEN_PAGE",
),
),
("Stats Settings", ("ENABLE_STATS_PAGE", "STATS_MAX_DAYS")),
Expand Down
1 change: 1 addition & 0 deletions src-frontend/src/pages/pageAndRouteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ const PageAndRouteConfig: PageAndRouteConfigType[] = [
loggedIn: true,
kiosk: true,
memberOnly: true,
featureEnabledFlag: 'enableLastSeenPage',
component: () => import('pages/LastSeen.vue'),
},
{
Expand Down
Loading