Thread:Project:Support desk/Is it possible to restrict user from all the Special Pages and Recent Changes Page??/reply (7)

See documentation on the User class - https://svn.wikimedia.org/doc/classUser.html. You can get a user object from the local request context object. Several of the authorization hooks will provide you with a user object directly.

You might want to look at what other user access extensions do. For example Extension:Whitelist_Namespaces. Keep in mind that MW is not really designed with viewing restrictions in mind. For example people can also transclude special pages, look up the info in the api, etc (All of which can be worked around, but be careful).

The hook you would most likely want is userCan but there are other authorization hooks like UserGetRights may be useful