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

last_connection and creation date feature #14

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Drumor
Copy link
Contributor

@Drumor Drumor commented Nov 14, 2018

I wrote this to detect inactive users (well to read that they are inactive).
If it's useless, you can delete this branch.

ictv/templates/users.html Outdated Show resolved Hide resolved
ictv/database.py Outdated Show resolved Hide resolved
ictv/database.py Outdated Show resolved Hide resolved
ictv/models/user.py Outdated Show resolved Hide resolved
ictv/models/user.py Outdated Show resolved Hide resolved
@@ -83,6 +85,13 @@ def get_subscriptions_of_owned_screens(self):
if UserPermissions.administrator in self.highest_permission_level:
return Subscription.select()
return self.screens.throughTo.subscriptions

def reconnect_since_creation(self):
if self.creation_date is None or self.last_connection is None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

So any existing user will never be considered to have been connected ? This is a tricky case that must be handle, my suggestion would be to set the creation_date of all existing users to the database update date.

ictv/pages/local_login.py Outdated Show resolved Hide resolved
ictv/pages/shibboleth.py Outdated Show resolved Hide resolved
ictv/templates/users.html Outdated Show resolved Hide resolved
ictv/models/user.py Outdated Show resolved Hide resolved
ictv/database.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants