3
0
mirror of https://github.com/snipe/snipe-it.git synced 2025-10-29 11:21:21 +00:00

Compare commits

...

11 Commits

Author SHA1 Message Date
snipe
df68dca9dc Warn if user has individual permission overrides 2025-10-25 18:57:17 +01:00
snipe
4a5bf78d58
Merge branch 'develop' into groups-ui-improvements 2025-10-25 18:31:22 +01:00
snipe
9bdf1a620f Built assets 2025-10-25 14:58:27 +01:00
snipe
f3976e5dd8
Merge pull request #18094 from Godmartinz/custom_field_color_fixx
Fixed fieldset colors on dark themes
2025-10-23 20:32:05 +01:00
Godfrey M
d7d6893304 fix Custom Fields section header font color 2025-10-23 12:05:13 -07:00
snipe
7eb15fe04d
Merge pull request #18091 from uberbrady/fix_backup_durations
Moved import time limit inside class, added new backup time limit
2025-10-23 18:51:35 +01:00
Brady Wetherington
4b7a06761a Moved import time limit inside class, added new backup time limit 2025-10-23 16:05:09 +01:00
snipe
324bc4957d
Merge pull request #18080 from Godmartinz/add-null-safe-operator-to-manager
Fixes admin alerts when a location doesnt have a manager
2025-10-22 11:56:59 +01:00
Godfrey M
4ab5d97e86 add nullsafe operator to location manager 2025-10-21 14:06:08 -07:00
snipe
63c5177b37
Merge pull request #18077 from Godmartinz/acceptance-notif-fixes-pt2
Adds admin to decline notification, fix asset and model name translations on asset notification
2025-10-21 18:31:28 +01:00
Godfrey M
4fbfaf6b9f add admin to decline, fix asset and model name translations 2025-10-21 10:22:34 -07:00
13 changed files with 46 additions and 11 deletions

View File

@ -8,8 +8,6 @@ use Symfony\Component\Console\Input\InputOption;
use Illuminate\Support\Facades\Log;
use Symfony\Component\Console\Helper\ProgressIndicator;
ini_set('max_execution_time', env('IMPORT_TIME_LIMIT', 600)); //600 seconds = 10 minutes
ini_set('memory_limit', env('IMPORT_MEMORY_LIMIT', '500M'));
/**
* Class ObjectImportCommand
@ -52,6 +50,9 @@ class ObjectImportCommand extends Command
*/
public function handle()
{
ini_set('max_execution_time', env('IMPORT_TIME_LIMIT', 600)); //600 seconds = 10 minutes
ini_set('memory_limit', env('IMPORT_MEMORY_LIMIT', '500M'));
$this->progressIndicator = new ProgressIndicator($this->output);
$filename = $this->argument('filename');

View File

@ -37,6 +37,8 @@ class SystemBackup extends Command
*/
public function handle()
{
ini_set('max_execution_time', env('BACKUP_TIME_LIMIT', 600)); //600 seconds = 10 minutes
if ($this->option('filename')) {
$filename = $this->option('filename');

View File

@ -87,7 +87,7 @@ class CheckoutAssetMail extends Mailable
$name = $this->target->assignedto?->display_name;
}
else if($this->target instanceof Location){
$name = $this->target->manager->name;
$name = $this->target->manager?->name;
}
// Check if the item has custom fields associated with it

View File

@ -224,6 +224,24 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
return false;
}
public function hasIndividualPermissions() {
if (is_object($this->permissions)) {
$permissions = json_decode(json_encode($this->permissions), true);
}
if (is_string($this->permissions)) {
$permissions = json_decode($this->permissions, true);
}
foreach ($permissions as $permission) {
if ($permission != 0) {
return true;
}
}
return false;
}
/**
* Internally check the user permission for the given section
*

View File

@ -31,6 +31,7 @@ class AcceptanceAssetDeclinedNotification extends Notification
$this->company_name = $params['company_name'];
$this->settings = Setting::getSettings();
$this->qty = $params['qty'] ?? null;
$this->admin = $params['admin'] ?? null;
}
/**
@ -70,7 +71,8 @@ class AcceptanceAssetDeclinedNotification extends Notification
'declined_date' => $this->declined_date,
'assigned_to' => $this->assigned_to,
'company_name' => $this->company_name,
'qty' => $this->qty,
'qty' => $this->qty,
'admin' => $this->admin,
'intro_text' => trans('mail.acceptance_asset_declined'),
])
->subject(trans('mail.acceptance_asset_declined'));

View File

@ -1512,6 +1512,7 @@ input[name="columnsSearch"] {
border-radius: 0px;
}
.callout.callout-legend h4 {
color: #333;
font-size: 16px;
font-weight: bold;
margin-top: 5px;
@ -1523,6 +1524,7 @@ input[name="columnsSearch"] {
cursor: pointer;
}
p.callout-subtext {
color: #333;
margin-top: 5px;
}
p.callout-subtext a:hover,

File diff suppressed because one or more lines are too long

View File

@ -1136,6 +1136,7 @@ input[name="columnsSearch"] {
border-radius: 0px;
}
.callout.callout-legend h4 {
color: #333;
font-size: 16px;
font-weight: bold;
margin-top: 5px;
@ -1147,6 +1148,7 @@ input[name="columnsSearch"] {
cursor: pointer;
}
p.callout-subtext {
color: #333;
margin-top: 5px;
}
p.callout-subtext a:hover,

File diff suppressed because one or more lines are too long

View File

@ -22848,6 +22848,7 @@ input[name="columnsSearch"] {
border-radius: 0px;
}
.callout.callout-legend h4 {
color: #333;
font-size: 16px;
font-weight: bold;
margin-top: 5px;
@ -22859,6 +22860,7 @@ input[name="columnsSearch"] {
cursor: pointer;
}
p.callout-subtext {
color: #333;
margin-top: 5px;
}
p.callout-subtext a:hover,
@ -24549,6 +24551,7 @@ input[name="columnsSearch"] {
border-radius: 0px;
}
.callout.callout-legend h4 {
color: #333;
font-size: 16px;
font-weight: bold;
margin-top: 5px;
@ -24560,6 +24563,7 @@ input[name="columnsSearch"] {
cursor: pointer;
}
p.callout-subtext {
color: #333;
margin-top: 5px;
}
p.callout-subtext a:hover,

View File

@ -1275,6 +1275,7 @@ input[name="columnsSearch"] {
}
.callout.callout-legend h4 {
color: #333;
font-size: 16px;
font-weight: bold;
margin-top: 5px;
@ -1288,7 +1289,8 @@ input[name="columnsSearch"] {
}
p.callout-subtext {
margin-top: 5px;
color:#333;
margin-top: 5px;
}
p.callout-subtext a:hover, p.callout-subtext a:visited, p.callout-subtext a:link {

View File

@ -7,7 +7,7 @@
| | |
| ------------- | ------------- |
@if (isset($item_name))
| **{{ trans('general.name') }}** | {{ $item_name }} |
| **{{ trans('general.asset_name') }}** | {{ $item_name }} |
@endif
| **{{ trans('mail.user') }}** | {{ $assigned_to }} |
@if (isset($user->location))
@ -32,7 +32,7 @@
| **{{ trans('general.category') }}** | {{ $item->model->category->name }} |
@endif
@if ((isset($item_model)) && ($item_model!=''))
| **{{ trans('mail.asset_name') }}** | {{ $item_model }} |
| **{{ trans('general.model_name') }}** | {{ $item_model }} |
@endif
@if (isset($item->model))
| **{{ trans('general.asset_model') }}** | {{ $item->model->name }} |

View File

@ -426,17 +426,19 @@
<div class="col-md-9">
@if ($user->groups->count() > 0)
@foreach ($user->groups as $group)
@can('superadmin')
<a href="{{ route('groups.show', $group->id) }}" class="label label-default">{{ $group->name }}</a>
@else
{{ $group->name }}
@endcan
@endforeach
@else
--
@endif
@if ($user->hasIndividualPermissions())
<span class="text-warning"><x-icon type="warning" />This user has at least one individual permission set.</span>
@endif
</div>
</div>