Looking to Create an Employee Access Page for Company Content

Hi. I’m hoping someone can help me. I own my own company and I am trying to create a login page for employees “only” where they can log in and have access to general company content, such as policies, templates, field documents, etc. I don’t need everyone to have their own community profile or to upload or add content, but if that’s the only way, that’s fine. But I’m mostly looking for a page simply for employees, to have access to documents that they need and can access them at any time, by logging in. I already have the member page set up, but I don’t know where to go from there. I also don’t want the “Sign-Up” on the page as I am not looking for customers or “the public” trying to access that information. When the employees are logged in, I want a page to open, that contains folders, for each topic I mentioned above, where employees can view or download documents. I hope this makes sense. Does anyone know if this is possible? Thanks in advance.

Hello Tina

Yes it is possible using wxCode. I suggest you start by the following:
-create new role to your members (employee) - check here
-then after user logs in you check their role to allow the access. - check here

Best
Massa

2 Likes

Thank you. I already had the first part done. I will continue on with your second step. Thanks again.

1 Like

Hi Massa. Your first suggestion made complete sense and it was a step that I had already completed. Your second suggestion/link was overwhelming. I’m not sure what to do with that information (I’m kind of a newbie to creating website and wxCode). Are there instructions somewhere that will help walk me through this process or if possible, could you elaborate a little further as to my exact reference point within that link that I would focus on?

@tlauchie
Hello Tina,

On page load you can get the current user’s role:

$w.onReady(function () {
 let user = wixUsers.currentUser;
 let userRole = user.role; // "employee"

 // if statment to allow user view or download 
});

The way to allow them would be by enabling the download or view buttons (they would be disabled on load )or by showing them (they would be hidden on load ) or in anyway that helps your goal.

Best
Massa

1 Like