package permissions

import (
	"lms.de/backend/modules/cache"
	"lms.de/backend/modules/database"
	"lms.de/backend/modules/utils"
)

func InitPermissions() {
	cache.SetMasterRolePermissions(utils.Permissions)

	// delete permission from database if not longer in permissions

	database.DB.Exec("DELETE FROM role_permissions WHERE permission NOT IN (?)", utils.Permissions)
}
