Skip to content

A free open source IT asset/license management system

Added notes for FMCS scoping

snipedf92076e1539
diff --git a/resources/lang/en-US/general.php b/resources/lang/en-US/general.php
index 30129d45fb..0a48ab53a7 100644
--- a/resources/lang/en-US/general.php
+++ b/resources/lang/en-US/general.php
@@ -580,6 +580,10 @@ return [
'system_default' => 'Use System Settings',
'system_default_help' => 'This will reset your light/dark mode preferences to use the defaults set in your computer operating system preferences.',
'theme' => 'Theme',
+ 'fmcs_select_note' => 'Full Multiple Company Support is enabled. Selections from other companies may not appear in this list.',
+ 'fmcs_location_select_note' => 'Full Multiple Company Support with location scoping is enabled. Only locations belonging to your company will appear in this list.',
+ 'fmcs_company_select_note' => 'Full Multiple Company Support is enabled. You can only assign companies you belong to.',
+ 'fmcs_company_select_superadmin_note' => 'Full Multiple Company Support is enabled. The company assigned here may affect visibility for non-superadmin users.',
'error_user_company' => 'Checkout target company and asset company do not match',
'error_user_company_multiple' => 'One or more of the checkout target company and asset company do not match',
'error_user_company_accept_view' => 'An Asset assigned to you belongs to a different company so you can\'t accept nor deny it, please check with your manager',
diff --git a/resources/views/blade/input/company-select.blade.php b/resources/views/blade/input/company-select.blade.php
index d4021cbe3a..93816a7479 100644
--- a/resources/views/blade/input/company-select.blade.php
+++ b/resources/views/blade/input/company-select.blade.php
@@ -48,5 +48,18 @@
</div>
@endunless
+ @if ($snipeSettings->full_multiple_companies_support == '1')
+ @cannot('superadmin')
+ <div class="col-md-6 col-md-offset-3">
+ <p class="help-block"><x-icon type="tip" /> {{ trans('general.fmcs_company_select_note') }}</p>
+ </div>
+ @endcannot
+ @can('superadmin')
+ <div class="col-md-6 col-md-offset-3">
+ <p class="help-block"><x-icon type="tip" /> {{ trans('general.fmcs_company_select_superadmin_note') }}</p>
+ </div>
+ @endcan
+ @endif
+
{!! $errors->first($name, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
</div>
diff --git a/resources/views/partials/forms/edit/accessory-select.blade.php b/resources/views/partials/forms/edit/accessory-select.blade.php
index e047d16d2f..47607b876f 100644
--- a/resources/views/partials/forms/edit/accessory-select.blade.php
+++ b/resources/views/partials/forms/edit/accessory-select.blade.php
@@ -15,6 +15,14 @@
@endif
</select>
</div>
+ @if ($snipeSettings->full_multiple_companies_support == '1')
+ @cannot('superadmin')
+ <div class="col-md-7 col-md-offset-3">
+ <p class="help-block"><x-icon type="tip" /> {{ trans('general.fmcs_select_note') }}</p>
+ </div>
+ @endcannot
+ @endif
+
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
</div>
diff --git a/resources/views/partials/forms/edit/asset-select.blade.php b/resources/views/partials/forms/edit/asset-select.blade.php
index b3a3682d77..37491b1609 100644
--- a/resources/views/partials/forms/edit/asset-select.blade.php
+++ b/resources/views/partials/forms/edit/asset-select.blade.php
@@ -37,6 +37,14 @@
@endif
</select>
</div>
+ @if ($snipeSettings->full_multiple_companies_support == '1')
+ @cannot('superadmin')
+ <div class="col-md-7 col-md-offset-3">
+ <p class="help-block"><x-icon type="tip" /> {{ trans('general.fmcs_select_note') }}</p>
+ </div>
+ @endcannot
+ @endif
+
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
</div>
diff --git a/resources/views/partials/forms/edit/company-select.blade.php b/resources/views/partials/forms/edit/company-select.blade.php
index 2fbd2bc532..d685ffd55c 100644
--- a/resources/views/partials/forms/edit/company-select.blade.php
+++ b/resources/views/partials/forms/edit/company-select.blade.php
@@ -23,5 +23,18 @@
@endif
</select>
</div>
+ @if ($snipeSettings->full_multiple_companies_support == '1')
+ @cannot('superadmin')
+ <div class="col-md-6 col-md-offset-3">
+ <p class="help-block"><x-icon type="tip" /> {{ trans('general.fmcs_company_select_note') }}</p>
+ </div>
+ @endcannot
+ @can('superadmin')
+ <div class="col-md-6 col-md-offset-3">
+ <p class="help-block"><x-icon type="tip" /> {{ trans('general.fmcs_company_select_superadmin_note') }}</p>
+ </div>
+ @endcan
+ @endif
+
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
</div>
diff --git a/resources/views/partials/forms/edit/consumable-select.blade.php b/resources/views/partials/forms/edit/consumable-select.blade.php
index ccc8030a77..9213729123 100644
--- a/resources/views/partials/forms/edit/consumable-select.blade.php
+++ b/resources/views/partials/forms/edit/consumable-select.blade.php
@@ -15,6 +15,14 @@
@endif
</select>
</div>
+ @if ($snipeSettings->full_multiple_companies_support == '1')
+ @cannot('superadmin')
+ <div class="col-md-7 col-md-offset-3">
+ <p class="help-block"><x-icon type="tip" /> {{ trans('general.fmcs_select_note') }}</p>
+ </div>
+ @endcannot
+ @endif
+
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
</div>
diff --git a/resources/views/partials/forms/edit/license-select.blade.php b/resources/views/partials/forms/edit/license-select.blade.php
index e6b8a8d7c2..e5135e3e85 100644
--- a/resources/views/partials/forms/edit/license-select.blade.php
+++ b/resources/views/partials/forms/edit/license-select.blade.php
@@ -15,6 +15,14 @@
@endif
</select>
</div>
+ @if ($snipeSettings->full_multiple_companies_support == '1')
+ @cannot('superadmin')
+ <div class="col-md-7 col-md-offset-3">
+ <p class="help-block"><x-icon type="tip" /> {{ trans('general.fmcs_select_note') }}</p>
+ </div>
+ @endcannot
+ @endif
+
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
</div>
diff --git a/resources/views/partials/forms/edit/location-profile-select.blade.php b/resources/views/partials/forms/edit/location-profile-select.blade.php
index f3db9ad9b7..ec13e55fdf 100644
--- a/resources/views/partials/forms/edit/location-profile-select.blade.php
+++ b/resources/views/partials/forms/edit/location-profile-select.blade.php
@@ -16,6 +16,14 @@
{!! $errors->first('location_id', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
+ @if ($snipeSettings->full_multiple_companies_support == '1' && $snipeSettings->scope_locations_fmcs == '1')
+ @cannot('superadmin')
+ <div class="col-md-8 col-md-offset-3">
+ <p class="help-block"><x-icon type="tip" /> {{ trans('general.fmcs_location_select_note') }}</p>
+ </div>
+ @endcannot
+ @endif
+
</div>
diff --git a/resources/views/partials/forms/edit/location-select.blade.php b/resources/views/partials/forms/edit/location-select.blade.php
index d1723a42b8..580979b16c 100644
--- a/resources/views/partials/forms/edit/location-select.blade.php
+++ b/resources/views/partials/forms/edit/location-select.blade.php
@@ -29,6 +29,14 @@
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
+ @if ($snipeSettings->full_multiple_companies_support == '1' && $snipeSettings->scope_locations_fmcs == '1')
+ @cannot('superadmin')
+ <div class="col-md-7 col-md-offset-3">
+ <p class="help-block"><x-icon type="tip" /> {{ trans('general.fmcs_location_select_note') }}</p>
+ </div>
+ @endcannot
+ @endif
+
@if (isset($help_text))
<div class="col-md-7 col-sm-11 col-md-offset-3">
<p class="help-block">{{ $help_text }}</p>
diff --git a/resources/views/partials/forms/edit/user-select.blade.php b/resources/views/partials/forms/edit/user-select.blade.php
index 0a08e6682b..f01f152e97 100644
--- a/resources/views/partials/forms/edit/user-select.blade.php
+++ b/resources/views/partials/forms/edit/user-select.blade.php
@@ -22,6 +22,14 @@
@endcan
</div>
+ @if ($snipeSettings->full_multiple_companies_support == '1')
+ @cannot('superadmin')
+ <div class="col-md-7 col-md-offset-3">
+ <p class="help-block"><x-icon type="tip" /> {{ trans('general.fmcs_select_note') }}</p>
+ </div>
+ @endcannot
+ @endif
+
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
</div>