You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Permission class doesn't have an id property, so the database calls in the syncPermissionsRole() function actually result in SQL errors because the permission_id is not defined.
I was able to run it by adding this code to the top of the syncPermissionsRole() function:
This solution is not perfect as it requires an additional db query. The id is actually generated when save is executed.
The real problem is $permissionshere is not changed by the actions in savePermissions. A more simple fix would probably be to pass the variable by reference here:
protected function savePermissions(array &$permissions)
UserFrosting Forum thread: https://forums.userfrosting.com/t/defaultpermissions-seed-doesnt-run/543
The Permission class doesn't have an
id
property, so the database calls in the syncPermissionsRole() function actually result in SQL errors because thepermission_id
is not defined.I was able to run it by adding this code to the top of the syncPermissionsRole() function:
and then changing the various
$permissions['PERMISSION_NAME']->id
calls to be$permissionIds['PERMISSION_NAME']
.The text was updated successfully, but these errors were encountered: