Updated Permissions
As we want permissions to be more flexible in VaultWiki 4, no doubt the cache would get quite large quickly. For this reason wiki permissions should be stored separately from other vBulletin permissions. To avoid multiple database lookups, we'll use a permission key system to fetch permissions of different types all at once, based on what we need, only when we need it. Any extra permissions fetched in this way will be available in memory just in case they are needed later in the page.
Completed for 4.0.0 Alpha 1. I've considered a number of different ways to cache the permissions to reduce processing time when they are fetched, but for Alpha 1 it's more important to be sure the permissions are all working, so we'll revisit caching at a later time.