Code-style fix.
Added events for permissions.