Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
3cf2e314
Commit
3cf2e314
authored
Feb 24, 2021
by
Francesc Guasch
Browse files
refactor: installation problem and undefined warning
parent
4383d2c3
Changes
3
Show whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
3cf2e314
...
...
@@ -4539,7 +4539,7 @@ sub _enforce_limits_active($self, $request) {
for
my
$id_user
(
keys
%domains
)
{
my
$user
=
Ravada::Auth::
SQL
->
search_by_id
(
$id_user
);
my
%grants
=
$user
->
grants
();
my
$start_limit
=
(
(
exists
(
$grants
{'
start_limit
'})
)
&&
(
$grants
{'
start_limit
'}
>
0
)
)
?
$grants
{'
start_limit
'}
:
$start_limit_default
;
my
$start_limit
=
(
defined
(
$grants
{'
start_limit
'})
&&
$grants
{'
start_limit
'}
>
0
)
?
$grants
{'
start_limit
'}
:
$start_limit_default
;
next
if
scalar
@
{
$domains
{
$id_user
}}
<=
$start_limit
;
next
if
$user
->
is_admin
;
...
...
sql/mysql/grant_types.sql
View file @
3cf2e314
...
...
@@ -3,6 +3,7 @@ CREATE TABLE `grant_types` (
`name`
char
(
32
)
NOT
NULL
,
`description`
varchar
(
255
)
NOT
NULL
,
`enabled`
int
default
NULL
,
`is_int`
int
default
0
,
UNIQUE
(
`name`
),
UNIQUE
(
`description`
),
PRIMARY
KEY
(
`id`
)
...
...
sql/sqlite/grant_types.sql
View file @
3cf2e314
...
...
@@ -3,5 +3,6 @@ CREATE TABLE `grant_types` (
,
`name`
char
(
32
)
NOT
NULL
,
`description`
varchar
(
255
)
NOT
NULL
,
`enabled`
integer
default
NULL
,
`is_int`
integer
default
0
,
UNIQUE
(
`name`
)
);
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment