Developer teams working in only one project

#1

Is it possible to work with more than one user logged in?
One development team working without overthrowing the other?

0 Likes

#2

If you use projects, you can have multiple people working on their own branches in their own editor, but the flow editor isn't really meant for more than one user simultaneously.

0 Likes

#3

Ahh I understood, I really wanted to work in flow, unfortunately it is not possible to have a team working in the same flow together

0 Likes

#4

Yes. You just have to be careful. When User A deploys changes, all of the other users will be notified and asked to review and merge those changes into their workspace. It isn't the best developer experience, but it's better than the old days when User B wouldn't know User A had updated the flows and would completely overwrite them with their own.

0 Likes

#5

So Nick, when a user logs in to the previous session is dropped, do you have any documentation that I can solve this problem?

0 Likes

#6

I stand corrected. Just tested it out and it looks like deploying in one tab no longer murders my undeployed edits in another. Kick ass! When did you do that?

0 Likes

#7

Sorry, not sure what you mean here. Can you explain a bit more what scenario you are concerned about?

0 Likes

#8

I have a team with 4 people developers and whenever a user logs in the nodeRED the interface drops allowing only one user logged into the server

0 Likes

#9

That doesn't sound right.... do they share the same user/password or do they each have their own?

0 Likes

#10

Each one has its own user

0 Likes

#11

I cannot reproduce that behaviour. I have an instance with two different users defined in adminAuth. I have two separate browser sessions, each logged in as a different user. They can both interact with the editor and deploy changes.

How have you setup adminAuth for your instance?

0 Likes

#12

I'm with these settings

   const Concore = require("concore-sdk-js");
// Conecta no datacore master por padrĂ£o;
const APP_ID = process.env.APP_ID || ' ';
const APP_KEY= process.env.APP_KEY || ' ';

if (APP_ID === 'datacoreMaster') {
  console.warn('Login configurado para datacoreMaster');
}

Concore.init('https://api.concore.io/api', APP_ID, APP_KEY);

module.exports = {
   type: "credentials",
   users: function(username) {
      console.log(`Checking ${username}`);
       return new Promise(function(resolve) {
           // Do whatever work is needed to check username is a valid
           // user.
           const { Auth } = Concore.Datacore;
           if (!Auth.isLogged()) {
            resolve(null);
            return;
           }

           const currentUser = Auth.getUser();
           console.log(currentUser);

           let valid = false;

           if (currentUser && currentUser.getAtoms('username') === username) {
            valid = true;
           }

           if (valid) {
               // Resolve with the user object. It must contain
               // properties 'username' and 'permissions'
               var user = { username: username, permissions: "*" };
               console.log(`${user.username} can ${user.permissions}`);
               resolve(user);
           } else {
               // Resolve with null to indicate this user does not exist
               console.log(`${username} does not exist`);
               resolve(null);
           }
       });
   },
   authenticate: function(username,password) {
        console.log(`Loggin in ${username}`);
       return new Promise(function(resolve) {
           const { Auth } = Concore.Datacore;
           let userId;

           Auth.login(username, password)
            .then(res => {
              console.log(`User ${res.getId()} found`);
              userId = res.getId();

              const { MoleculeQuery } = Concore.Datacore;
              const query = new MoleculeQuery('Role');
              query.equalTo('name', 'Administrators');
              return query.first();
            })
            .then(adminGroup => {
              let isAdmin = false;
              const users = adminGroup.getAtoms('users');
              users.forEach(u => {
                if (u.id === userId) {
                  console.log(`User ${username} is ADMIN`);
                  isAdmin = true;
                  var user = { username: username, permissions: "*" };
                  resolve(user);
                  return;
                }
              });

              if (!isAdmin) {
                console.log(`User ${username} is NOT ADMIN`);
                resolve(null);
              }
            })
            .catch(err => {
              console.error(err);
              resolve(null);
            });
       });
   },
   default: function() {
       return new Promise(function(resolve) {
           // Resolve with the user object for the default user.
           // If no default user exists, resolve with null.
           // resolve({anonymous: true, permissions:"read"});
           resolve(null);
       });
   }
}
0 Likes

#13

Ah - so you are using a custom auth plugin. Have you debugged why it is logging people out?

0 Likes