How to only allow a small group of people to login to Moodle?

How to only allow a small group of people to login to Moodle?

by Longfei Yu -
Number of replies: 2

Hello, 

The story is we have a TEST instance which is a clone of Production site. For whatever of reasons, some students logged into this TEST site and did some work. We tried a couple of different things to prevent this from happening again, like changing the theme, etc. Right now, we only allow manual login to this site temporarily, which is not a permanent solution.

We are using SAML2 authentication. 

We do need a group of people (like 40~50 people) to access the TEST instance regularly. The TEST instance got refreshed from Production from time to time. I am wondering what's the best and easy way to limit the access only to a small group of people. 

Thanks.

Average of ratings: -
In reply to Longfei Yu

Re: How to only allow a small group of people to login to Moodle?

by Randy Thornton -
Picture of Documentation writers

A couple of possible options are:

1) Suspend all the users with auth type SAML2 except for those in that group that need the access.

2) Change the login type for all those users who should not be logging in via SAML2 to 'nologin'. This would work if nothing depends on the users in the test instance actually needing the connection back to whatever is behind the SAML authentication (eg updating user fields etc).

You can do either of these in bulk using the Upload users tool.
In reply to Longfei Yu

Re: How to only allow a small group of people to login to Moodle?

by Eric Hagley -
You could also set an "Enrolment key" for the course and only give the password to those you want to access it to.