Commit 3cf2e314 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

refactor: installation problem and undefined warning

parent 4383d2c3
......@@ -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;
......
......@@ -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`)
......
......@@ -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`)
);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment