Added $permissions variabele in the controllers files.