Add bulk of users in gitlab using gitlabapi - node.js

I am able to add a single user using Gitlabapi but, I need to add many users so Is there any possibility to add bulk of users at a time to Gitlab project using Gitlabapi. And while creating users, role and the group should be assigned as well.
I am using node.js for implementing this. Is there any library in node.js to do all these functionalities???
I found one library(i.e, gitlab) in node.js but with that I can able to fetch users, projects and create projects but am not able to create users

No you can't create multiple users at once as per the documentation https://docs.gitlab.com/ee/api/members.html API accepts user id as a part of URI. To reduce the time to create multiple users you can try doing it in a parallel requests.

Related

How do I create multiple activity feeds using the same appid and key?

We allow our creators to create their own site, so how do we get one feed per site?
How do we create multiple react activity feeds using one single getsteam app?
One simple way to do this is to adopt a naming convention to your feed and include some namespacing.
For instance, you could make feed IDs include the name or the ID of the application:
ie. timeline:${app.id}-${user.id} would be the timeline feed ID for app's user.

A feed in which different users can add activities

In my app I want to have some feed where different users can add activities
How can I do this? Are there any settings of user rights?
It would help if you could elaborate on what you are trying to build (e.g. what kind of user ACL you are trying to offload to Stream) and whether you are using an SDK or the REST API directly. Multiple users can add activities to the same feed.
Regarding user rights, permissions they would be embedded in the JWT token when you're doing server-side authentication, as exposed here.

WSO2 APIM How to limit user to execute only in sandbox

I want to publish my API, but I want to limit so users can only execute in sandbox environment (I want to limit production to specific user/customers with specific agreement).
This is a basic functionality in other API managers, but I don't find how to do in WSO2.
I have found this article in Medium, and also noticed that when I create an aplication, a couple of new roles are created (Application/user_application_SANDBOX and Application/user_application_PRODUCTION), but I don't find how to use them.
Deep dive in doc doesn't helped me.
Option 1:
You can use application registration workflow to control key generation for production and sandbox, by sending it through an approval process.
If you want to automate it based on a property or something, you can write a custom workflow extension.
However, this is applied to applications but not to APIs. That means if you allow generating prod keys for an application, all APIs, that the application has subscribed to, are accessible with prod keys.
Option2:
If you want to do this in API level, you can write a custom mediation sequence. Within the custom sequence, you can read the key type (i.e. production or sandbox), subscriber, enduser (if required) etc. and decide whether you want to allow the request or not.

Way to sync users between multiple databases in nodejs - mongodb app

I'm working on a nodejs app, which can have users using multiple languages. So my design is creating lang1.example.com and lang2.example.com sites for respective languages. So that it's easy to manage each language with its own database.
At the same time, I don't want users to create different accounts for each language - so that they can keep using same credentials across the different domains.
To do this, I'm planning to sync the credentials in users collection across all the databases. This syncing will happen whenever an user creates an account Or user changes credentials(password, email, etc.).
The other fields in the users collection will not be synced - such as user followers, user's language specific activities.
However, I'm not feeling confident about above design approach since it will involve a lot of syncing between the databases.
What could be an alternate solution so that I can avoid such syncing ?

get stream list of all users in nodeJS

i'm using the javascript getstream integration library: https://github.com/GetStream/stream-js.
I've configured a user feed on my getstream dashboard, suppose i add few users as user:test1 user:test2 user:test3. Is there any way that i can get list of all users that are registered on the user feed group.
Similarly i want this to work for news updates posted by user, where he can see list of users and can follow them.
It is currently not possible to list all the feeds created on a certain feed group via API. You are responsible to store the users of your application within your own backend.

Resources