Skip to content
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

Implement login for Admin and Super-Admin #493

Closed
tasneemkoushar opened this issue Feb 22, 2023 · 18 comments · Fixed by #539
Closed

Implement login for Admin and Super-Admin #493

tasneemkoushar opened this issue Feb 22, 2023 · 18 comments · Fixed by #539
Assignees

Comments

@tasneemkoushar
Copy link
Contributor

tasneemkoushar commented Feb 22, 2023

Is your feature request related to a problem? Please describe.
Admins of several organizations may control the personnel and operations of their own organizations using talawa-admin. Presently, when you attempt to connect into talawa-admin, you are logged in as super-admin and are able to access information for other organizations in addition to your own.
You can refer to the image below.
11

Describe the solution you'd like
The login screen should stay the same, but when a user enters their credentials, it should automatically determine if they are an admin or a super-admin. Although the super admin might travel down through all the organizations, the admin should only be allowed access to their specific organization.

Describe alternatives you've considered
The contributor can come up with her/ his own ideas.

Approach to be followed

  • We want to minimize changes to the existing design. Keep the current design.
  • Code coverage for all files editor must be 100%

Additional context

  • API calls may have to be modified and the relevant issues created
@Manoramsharma
Copy link
Contributor

Hi @tasneemkoushar , I would like to work on this issue. We just need to render the existing code over a condition of pre determining the user as admin and super-admin just after the login.

@tasneemkoushar
Copy link
Contributor Author

@Manoramsharma What's the status?

@Manoramsharma
Copy link
Contributor

Hi @tasneemkoushar I have done with the asked changes but as I already mentioned in talawa-admin channel I am getting that yarn error, which is producing unnecessary changes by changing yarn.lock file due to which I am unable to make a PR. Here is the link to the issue which I mentioned.
https://thepalisadoes-dyb6419.slack.com/archives/C01RPC00K0D/p1677756698705999

@palisadoes
Copy link
Contributor

Please merge your repo with the upstream, then reinstall the packages. There have been many changes.

@palisadoes
Copy link
Contributor

@Manoramsharma Did you get this fixed?

@Manoramsharma
Copy link
Contributor

image

Still this error? The problem is many of our packages are deprecated that are present in our `yarn.lock` file so modification in yarn.lock file is requested which I forbidden by using `yarn --immutable` flag in yarn command for installing the dependencies , If I use `yarn` simply to install the dependencies it will modify the yarn.lock file which is not accepted

@Manoramsharma
Copy link
Contributor

Also @palisadoes Talawa-admin is using yarn v1 which is deprecated and not maintained anymore. So, getting errors with it is trivial. If we try upgrading it to newer version the whole app breaks.

@Manoramsharma
Copy link
Contributor

@palisadoes
Copy link
Contributor

Why is this not affecting others? Are you adding new packages?

@Manoramsharma
Copy link
Contributor

Why is this not affecting others? Are you adding new packages?

It's done, basically only the v1 versions will be fine for working with talawa-admin as it uses v1 only. The issue i was getting was due to my latest version of yarn i.e 3.4.1. So if anyone with the latest version of yarn , run yarn command in the root of the talawa-admin project the latter can modify our yarn.lock that i was facing from last few days.So I brought down my version to v1 . I already pinned the conversation on Talawa-admin channel

@palisadoes
Copy link
Contributor

  1. Please submit a PR for this.
  2. Should we create an issue to upgrade packages for Talawa-Admin in the mean time?

@faraz16iqbal
Copy link

@palisadoes is this issue still open?

@anshgoyalevil
Copy link
Contributor

@faraz16iqbal

Thanks for contributing to Talawa projects.

This issue is already assigned to @Manoramsharma

Please check other issues across different Talawa Repos, and select the ones which are not assigned to anyone

@xoldd
Copy link

xoldd commented Mar 7, 2023

Why is this not affecting others? Are you adding new packages?

Yarn v1 has reached end of life. Currently yarn is on v3 and it's not backward compatible, because there's many core changes related to its internal workings. Talawa-admin is deeply integrated with yarn v1 and create-react-app(this too is a cause for major disruptions and warnings) and making use of yarn v3 breaks the app.

@palisadoes
Copy link
Contributor

@xoldyckk Should we create an issue to upgrade to Yarn v3?

@xoldd
Copy link

xoldd commented Mar 7, 2023

@xoldyckk Should we create an issue to upgrade to Yarn v3?

Yeah. Technically if it's going to be done, there's no need to upgrade to yarn v3. We can simply start using npm. Then both talawa-api and talawa-admin will be using the same package manager.

@palisadoes
Copy link
Contributor

I'll make it npm

@Manoramsharma
Copy link
Contributor

@xoldyckk Should we create an issue to upgrade to Yarn v3?

Yeah. Technically if it's going to be done, there's no need to upgrade to yarn v3. We can simply start using npm. Then both talawa-api and talawa-admin will be using the same package manager.

It will be easier to manage in case of npm , also when both of our projects will be using the same package manager there will be less breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants