Private
Public Access
listoooooooooo
Signed-off-by: fede <federico.nicolas.polidoro@gmail.com>
This commit is contained in:
1 parent
ff21aa4264
commit
ce83c494c9
4 files changed
+48
-86
No files matched your search
@@ -3,37 +3,16 @@ 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 = 6
|
||||
PermisoGestionMarcas uint = 5
|
||||
PermisoGestionEmpresa uint = 7
|
||||
PermisoPlataforma uint = 8
|
||||
PermisoGestionStock uint = 9
|
||||
PermisoGestionAlmacenes uint = 10
|
||||
PermisoGestionProveedores uint = 11
|
||||
PermisoGestionClientes uint = 12
|
||||
PermisoGestionPermisos uint = 1
|
||||
PermisoGestionGrupos uint = 2
|
||||
PermisoGestionUsuarios uint = 3
|
||||
PermisoGestionRepuestos uint = 4
|
||||
PermisoGestionLogs uint = 6
|
||||
PermisoGestionMarcas uint = 5
|
||||
PermisoGestionEmpresa uint = 7
|
||||
PermisoPlataforma uint = 8
|
||||
PermisoGestionStock uint = 9
|
||||
PermisoGestionAlmacenes uint = 10
|
||||
PermisoGestionProveedores uint = 11
|
||||
PermisoGestionClientes uint = 12
|
||||
)
|
||||
|
||||
// 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,
|
||||
PermisoGestionStock,
|
||||
PermisoGestionAlmacenes,
|
||||
PermisoGestionProveedores,
|
||||
PermisoGestionClientes,
|
||||
}
|
||||
}
|
||||
|
||||
func EsPermisoDePlataforma(id uint) bool {
|
||||
return id == PermisoGestionPermisos || id == PermisoPlataforma
|
||||
}
|
||||
Reference in new issue
Block a user