djaodjin / djaodjin-saas

Django application for software-as-service and subscription businesses
Other
564 stars 124 forks source link

Extends `Role` with an `ends_at` field #227

Closed smirolo closed 1 year ago

smirolo commented 4 years ago

It is sometimes beneficial to grant a Role for a specified period, automatically removing the grant after a date is passed.

Add an ends_at field to Role and make the appropriate modifications such that when when ends_at is not None, the Role is only valid if datetime_or_now < ends_at. When ends_at is None, current behavior is assumed.

smirolo commented 1 year ago

done in PR #268