mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Allow user folder permissions to be updated
Updated the endpoint for `.set_permissions` to update a user's folder permissions as well as permissions for a service. User folder permissions are optional for now, since Admin is not currently passing this data through.
This commit is contained in:
13
app/dao/service_user_dao.py
Normal file
13
app/dao/service_user_dao.py
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
from app import db
|
||||
from app.dao.dao_utils import transactional
|
||||
from app.models import ServiceUser
|
||||
|
||||
|
||||
def dao_get_service_user(user_id, service_id):
|
||||
return ServiceUser.query.filter_by(user_id=user_id, service_id=service_id).one()
|
||||
|
||||
|
||||
@transactional
|
||||
def dao_update_service_user(service_user):
|
||||
db.session.add(service_user)
|
||||
Reference in New Issue
Block a user