"Generate Labels" permissions
Other than making someone a super-admin, I cant seem give permissions to generate labels?

I've just tried to create a user within the Demo (Jason Test) and give "Admin" permissions (as opposed to super-admin) and assign to a company. Also assigned a few assets to said company. Seems to be disabled.....
Any help on this? It's kinda my last stumbling block (now that the fuzzy barcodes are sorted)
Ok... digging through the code (remember: I'm NOT a programmer...)
It looks like the barcode generation uses getQrCode? Within getQrCode there is: if (!Company::isCurrentUserHasAccess($asset)) I cant seem to find any 'label specific' permissions, so I assume its just "Is the user allocated to the Company?" I have Full Multiple Companies Support enabled
getQrCode() just gets an individual QR code for browser display/caching. I think this section is what's triggering your error. https://github.com/snipe/snipe-it/blob/master/app/Http/Controllers/AssetsController.php#L1418-L1420
That method calls:
public static function isCurrentUserAuthorized()
{
return ((!static::isFullMultipleCompanySupportEnabled()) || (Auth::user()->isSuperUser()));
}
So yes, it looks like only superusers can generate labels IF full company support is enabled. I believe this has been resolved in the upcoming v4.
Is there any fix/hack I can apply to v3?
will ->isAdmin() work?
Don't change the isCurrentUserAuthorized() method - that's an authorization method that could have much further-reaching impact than just labels, and could open things up to people being allowed to do things they're not supposed to be able to do.
If you have to make this work for v3, change:
if (!Company::isCurrentUserAuthorized()) {
return redirect()->to('hardware')->with('error', trans('general.insufficient_permissions'));
} elseif (!Input::has('edit_asset')) {
return redirect()->back()->with('error', 'No assets selected');
} else {
$asset_raw_array = Input::get('edit_asset');
foreach ($asset_raw_array as $asset_id => $value) {
$asset_ids[] = $asset_id;
}
}
location here: https://github.com/snipe/snipe-it/blob/master/app/Http/Controllers/AssetsController.php#L1418-L1431
to:
if (!Input::has('edit_asset')) {
return redirect()->back()->with('error', 'No assets selected');
} else {
$asset_raw_array = Input::get('edit_asset');
foreach ($asset_raw_array as $asset_id => $value) {
$asset_ids[] = $asset_id;
}
}
BEAUTIFUL!! THANK YOU so much
No problem - glad that got you sorted.

Gotta hack the Gibson