Add a "my consumers" permission.

Only allows the user access to view/edit the consumers they registered.
Add ability for permissions to do some database filtering.

Permissions can add criterion if they're interested in filtering the
class being queried. AbstractHibernateCurator manages the creation of
the secured Criteria, so developers need to be sure to go through this
method rather than grabbing a Criteria directly from the session.
Apply permission query filters as an OR rather than an AND.

Idea here is a multi-org principal would see nothing if he had two
permissions, each restricting the results of the query to different
orgs.
Remove an unused test entitlement cert.
Add query filters for owner permission.

This helps to prevent accidental access to owners a user should not be
able to see.

Behaviour changes slightly for this in situations where you're trying to
get access to something you can't have. A find by primary key will still
return a forbidden, but a find by other properties will now just return
a not found. This is a small net gain in that it hides information about
what exists and what doesn't from the caller. Given this is only for
situations where we're refusing access, it should not affect any
legitemate users or integrating apps.
Add a "my consumers" permission.

Only allows the user access to view/edit the consumers they registered.
Add ability for permissions to do some database filtering.

Permissions can add criterion if they're interested in filtering the
class being queried. AbstractHibernateCurator manages the creation of
the secured Criteria, so developers need to be sure to go through this
method rather than grabbing a Criteria directly from the session.
Apply permission query filters as an OR rather than an AND.

Idea here is a multi-org principal would see nothing if he had two
permissions, each restricting the results of the query to different
orgs.
Remove an unused test entitlement cert.
Add query filters for owner permission.

This helps to prevent accidental access to owners a user should not be
able to see.

Behaviour changes slightly for this in situations where you're trying to
get access to something you can't have. A find by primary key will still
return a forbidden, but a find by other properties will now just return
a not found. This is a small net gain in that it hides information about
what exists and what doesn't from the caller. Given this is only for
situations where we're refusing access, it should not affect any
legitemate users or integrating apps.
Merge branch 'user-perms' of github.com:candlepin/candlepin into ckozak/user-perms

Conflicts:
	src/test/java/org/candlepin/resource/test/OwnerResourceTest.java
Added permissions for other types
Added more secure queries and fixed tests
Checkstyle.
Refactor dev/QE permissions model to support other types.

Previously we only could store owner permissions in our database,
leaving us with no way to store and test other permission setups without
writing customized user services.

Transition to a model where we store a PermissionBlueprint in the
database, which is just enough information for the PermissionFactory to
create a Java Permission object with the data it needs. The Permission
object remains responsible for checking if it has access to some entity.
Merge branch 'master' into dgoodwin/user-perms

Conflicts:
	src/main/resources/db/changelog/changelog-create.xml
	src/main/resources/db/changelog/changelog-update.xml
1030644: Possibly temporary performance fix for distributors with lots of ents.

Problems with data serialization in the rules have exposed issue with
consumers with lots of entitlements. Current issue is for distributors
with 200+. As we do not care about status for these distributors, this
patch disables compliance checking and just reports that everything is
ok.

This will possibly be reverted, as we need to investigate the actual
issue for other types of consumers as well.
Add a script testing bind performance.

Per recent discussions this script exposes rapid degredation in bind
time as entitlements are added to a system. It does not however expose
problems with GET /consumer yet.
Switch to slf4j.

Also re-organize imports in the affected classes according to
project standards.
Switch logging implementation to logback.