Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

Revision 359 | Revision 369 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 359 Revision 366
Zeile 18... Zeile 18...
18
    use App\Http\Controllers\bestellwesen\SupplierWarehouseController;
18
    use App\Http\Controllers\bestellwesen\SupplierWarehouseController;
19
    use App\Http\Controllers\ToolboxController;
19
    use App\Http\Controllers\ToolboxController;
20
    use App\Models\Module;
20
    use App\Models\Module;
21
    use App\Models\OrderType;
21
    use App\Models\OrderType;
22
    use App\Models\Shop;
22
    use App\Models\Shop;
-
 
23
    use App\Models\Tool;
23
    use App\Models\UserProperty;
24
    use App\Models\UserProperty;
24
    use App\Models\Web;
25
    use App\Models\Web;
25
    use App\Models\WebProperty;
26
    use App\Models\WebProperty;
26
    use Illuminate\Support\Facades\Route;
27
    use Illuminate\Support\Facades\Route;
Zeile 91... Zeile 92...
91
        $GLOBALS["user_rechte"] = $GLOBALS["web_rechte"];
92
        $GLOBALS["user_rechte"] = $GLOBALS["web_rechte"];
92
        if ( !$admin )
93
        if ( !$admin )
93
        {
94
        {
94
            $user_rechte = UserProperty::with( [
95
            $user_rechte = UserProperty::with( [
95
                "property",
96
                "property",
96
                "property.tool",
-
 
97
                "property.tool.module"
-
 
98
            ] )->where( "backend_user_id", "=", $uId )->get();
97
            ] )->where( "backend_user_id", "=", $uId )->get();
99
            foreach ( $user_rechte as $user_recht )
98
            foreach ( $user_rechte as $user_recht )
100
            {
99
            {
101
                $property = $user_recht->property;
100
                $property = $user_recht->property;
102
                $tool = $property->tool;
101
                $tool = Tool::find( $property->tool_id );
103
                $module = $tool->module;
102
                $module = Module::find( $tool->module_id );
104
                $GLOBALS["user_rechte"][$module->interner_name][$tool->button_name][$property->interner_name] = 1;
103
                $GLOBALS["user_rechte"][$module->interner_name][$tool->button_name][$property->interner_name] = 1;
105
            }
104
            }
106
        }
105
        }
107
        View::share( "user_rechte", $GLOBALS["user_rechte"] );
106
        View::share( "user_rechte", $GLOBALS["user_rechte"] );
108
    }
107
    }