Private
Public Access
primeros cambios hechos para tener el multitenant
This commit is contained in:
1 parent
34ad4424f9
commit
4e082e8767
132 files changed
+6202
-762
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package models_seguridad
|
||||
|
||||
// IDs estables del catálogo global de permisos. Se mantienen fijos para no
|
||||
// romper tokens, grupos ni datos existentes.
|
||||
const (
|
||||
PermisoGestionPermisos uint = 1
|
||||
PermisoGestionGrupos uint = 2
|
||||
PermisoGestionUsuarios uint = 3
|
||||
PermisoGestionRepuestos uint = 4
|
||||
PermisoGestionLogs uint = 5
|
||||
PermisoGestionMarcas uint = 6
|
||||
PermisoGestionEmpresa uint = 7
|
||||
PermisoPlataforma uint = 8
|
||||
)
|
||||
|
||||
// PermisosDeEmpresa son los permisos que puede recibir una empresa. Los
|
||||
// permisos de plataforma (1 y 8) nunca se asignan a grupos de tenant.
|
||||
func PermisosDeEmpresa() []uint {
|
||||
return []uint{
|
||||
PermisoGestionGrupos,
|
||||
PermisoGestionUsuarios,
|
||||
PermisoGestionRepuestos,
|
||||
PermisoGestionLogs,
|
||||
PermisoGestionMarcas,
|
||||
PermisoGestionEmpresa,
|
||||
}
|
||||
}
|
||||
|
||||
func EsPermisoDePlataforma(id uint) bool {
|
||||
return id == PermisoGestionPermisos || id == PermisoPlataforma
|
||||
}
|
||||
Reference in new issue
Block a user