-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make language
setting available via graph user (read & write)
#5455
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
@2403905 we just discussed language a view minutes ago, maybe this one is interresting for you too. |
We will extend the libregraph user resuource with a
Note: Clients can store To set the language to english: PATCH https://cloud.ocis.test/graph/v1.0/me
Content-type: application/json
{
"preferreddLanguage": "en"
} when successful will return a |
To persist the language setting we have to use the settings service, as it contains the currently configured language of the user. We also cannot use the User resource of the CS3 API to store the language, as it has no language property. For the LDAP backend we could use the inetOrgPerson optional preferredLanguage attribute, but it might be readonly. To avoid problems with these backends we will stick to the settings service at the cost of making an additional request to the settings service (which requires a new grpc client) that can be aquired with eg.: traceProvider, err := tracing.GetServiceTraceProvider(cfg.Tracing, cfg.Service.Name)
if err != nil {
l.Error().Err(err).Msg("cannot initialize tracing")
return err
}
grpcClient, err := grpc.NewClient(
append(
grpc.GetClientOptions(cfg.GRPCClientTLS),
grpc.WithTraceProvider(traceProvider),
)...,
)
if err != nil {
l.Error().Err(err).Msg("cannot create grpc client")
return err
}
valueService := settingssvc.NewValueService("com.owncloud.api.settings", grpcClient) |
can we close this now? |
Is your feature request related to a problem? Please describe.
Actually two ideas:
language
attribute on the user data type and being able to update that to any string would be much appreciated. That way ownCloud Web could define the available languages based on translation coverage from transifex.Acceptance Criteria
language
prop in GET/me
and GET/users/{user-id}
Clients can set Being able to set any alphanumeric value in PATCH/users/{user-id}
Clients can set the language during the POST request to create a userNOTE: we removed the requirement to do any admin related read or write with the preferred language because that would be a major change to the settings service. The settings service can currently only read and write settings for the acting user.
The text was updated successfully, but these errors were encountered: