mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-12 08:12:27 -05:00
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.
14 lines
326 B
Python
14 lines
326 B
Python
|
|
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)
|