Initial Commit für das Grundgerüst der Anwendung, bestehend aus der Dev-Container Konfiguration, der Docker und docker-Compose Definitionen sowie der Verzeichnisse App_Server für die Backend-Programme sowie Client für die browserseitigen GUI-Komponenten
This commit is contained in:
1 parent
10549934ea
commit
1ba78992a6
63 files changed
+5410
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { iUserApp } from "./applications"
|
||||
import { iRole } from "./roles"
|
||||
|
||||
export interface iUser {
|
||||
id: number
|
||||
userid: string
|
||||
username: string
|
||||
password: string
|
||||
email: string
|
||||
telefon: string
|
||||
isSysAdmin: boolean
|
||||
userapps: iUserApp[]
|
||||
}
|
||||
|
||||
export function hasAppRole(user: iUser, appid: number, roleid: number) {
|
||||
let userapp: iUserApp = user.userapps.find((userapp: iUserApp) => {return userapp.appid == appid})
|
||||
if (userapp != undefined) {
|
||||
let userapprole: iRole = userapp.userapp_roles.find((role: iRole) => {return role.id == roleid})
|
||||
if (userapprole != undefined) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
Reference in new issue
Block a user