func (e *Enforcer) DeletePermissionsForUser(ctx context.Context, user string) (bool, error) {
	res, err := e.client.remoteClient.DeletePermissionsForUser(ctx, &pb.PermissionRequest{
		EnforcerHandler: e.handler,
		User:            user,
	})
	if err != nil {
		return false, err
	}
	return res.Res, nil
}
DeletePermissionsForUser deletes permissions for a user or role.
Returns false if the user or role does not have any permissions (aka not affected).
package client
import (
	"context"
	pb "github.com/casbin/casbin-server/proto"
)
func (e *Enforcer) GetRolesForUser(ctx context.Context, name string) ([]string, error) {
	res, err := e.client.remoteClient.GetRolesForUser(ctx, &pb.UserRoleRequest{
		EnforcerHandler: e.handler,
		User:            name,
	})
	if err != nil {
		return nil, err
	}
	return res.Array, nil
}
func (e *Enforcer) GetImplicitRolesForUser(ctx context.Context, name string, domain ...string) ([]string, error) {
	res, err := e.client.remoteClient.GetImplicitRolesForUser(ctx, &pb.UserRoleRequest{
		EnforcerHandler: e.handler,
		User:            name,
	})
	if err != nil {
		return nil, err
	}
	return res.Array, nil
}
func (e *Enforcer) GetUsersForRole(ctx context.Context, name string) ([]string, error) {
	res, err := e.client.remoteClient.GetUsersForRole(ctx, &pb.UserRoleRequest{
		EnforcerHandler: e.handler,
		User:            name,
	})
	if err != nil {
		return nil, err
	}
	return res.Array, nil
}
func (e *Enforcer) HasRoleForUser(ctx context.Context, user, role string) (bool, error) {
	res, err := e.client.remoteClient.HasRoleForUser(ctx, &pb.UserRoleRequest{
		EnforcerHandler: e.handler,
		User:            user,
		Role:            role,
	})
	if err != nil {
		return false, err
	}
	return res.Res, nil
}
func (e *Enforcer) AddRoleForUser(ctx context.Context, user, role string) (bool, error) {
	res, err := e.client.remoteClient.AddRoleForUser(ctx, &pb.UserRoleRequest{
		EnforcerHandler: e.handler,
		User:            user,
		Role:            role,
	})
	if err != nil {
		return false, err
	}
	return res.Res, nil
}
func (e *Enforcer) DeleteRoleForUser(ctx context.Context, user, role string) (bool, error) {
	res, err := e.client.remoteClient.DeleteRoleForUser(ctx, &pb.UserRoleRequest{
		EnforcerHandler: e.handler,
		User:            user,
		Role:            role,
	})
	if err != nil {
		return false, err
	}
	return res.Res, nil
}
func (e *Enforcer) DeleteRolesForUser(ctx context.Context, user string) (bool, error) {
	res, err := e.client.remoteClient.DeleteRolesForUser(ctx, &pb.UserRoleRequest{
		EnforcerHandler: e.handler,
		User:            user,
	})
	if err != nil {
		return false, err
	}
	return res.Res, nil
}
func (e *Enforcer) DeleteUser(ctx context.Context, user string) (bool, error) {
	res, err := e.client.remoteClient.DeleteUser(ctx, &pb.UserRoleRequest{
		EnforcerHandler: e.handler,
		User:            user,
	})
	if err != nil {
		return false, err
	}
	return res.Res, nil
}
func (e *Enforcer) DeleteRole(ctx context.Context, role string) error {
	_, err := e.client.remoteClient.DeleteRole(ctx, &pb.UserRoleRequest{
		EnforcerHandler: e.handler,
		Role:            role,
	})
	return err
}
func (e *Enforcer) GetPermissionsForUser(ctx context.Context, user string) ([][]string, error) {
	res, err := e.client.remoteClient.GetPermissionsForUser(ctx, &pb.PermissionRequest{
		EnforcerHandler: e.handler,
		User:            user,
	})
	if err != nil {
		return nil, err
	}
	return replyTo2DSlice(res), nil
}
func (e *Enforcer) GetImplicitPermissionsForUser(ctx context.Context, user string, domain ...string) ([][]string, error) {
	res, err := e.client.remoteClient.GetImplicitPermissionsForUser(ctx, &pb.PermissionRequest{
		EnforcerHandler: e.handler,
		User:            user,
	})
	if err != nil {
		return nil, err
	}
	return replyTo2DSlice(res), nil
}
func (e *Enforcer) DeletePermission(ctx context.Context, permission ...string) (bool, error) {
	res, err := e.client.remoteClient.DeletePermission(ctx, &pb.PermissionRequest{
		EnforcerHandler: e.handler,
		Permissions:     permission,
	})
	if err != nil {
		return false, err
	}
	return res.Res, nil
}
func (e *Enforcer) AddPermissionForUser(ctx context.Context, user string, permission ...string) (bool, error) {
	res, err := e.client.remoteClient.AddPermissionForUser(ctx, &pb.PermissionRequest{
		EnforcerHandler: e.handler,
		User:            user,
		Permissions:     permission,
	})
	if err != nil {
		return false, err
	}
	return res.Res, nil
}
func (e *Enforcer) DeletePermissionForUser(ctx context.Context, user string, permission ...string) (bool, error) {
	res, err := e.client.remoteClient.DeletePermissionForUser(ctx, &pb.PermissionRequest{
		EnforcerHandler: e.handler,
		User:            user,
		Permissions:     permission,
	})
	if err != nil {
		return false, err
	}
	return res.Res, nil
}