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
}
GetUsersForRole gets the users that has a role.
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
}