You should just do: permissionObject.manageRoles = true; for example rather than messing with setBit.