Your question has been submitted and is awaiting moderation.
What are the full steps to unauthorize a child portal admin? This will take some explaining.
I'm working on a project where there may be as many as 2500 portals in operation at a given time. Sales reps will create portals for clients.
Their immediate supervisors will be admins on these portals.
If a supervisor is transferred, removed, etc. and they are the "root" admin -- the admin user created when the portal was created, they can't be removed from the admin role and indeed, when a collection of users in the admin role are queried, the "root" admin doesn't show up. ("root" means default admin)
However, the default admin can be unauthorized.
Here is the code I need to ask questions about.
private void cmdUnAuthorize_Click(object sender, EventArgs e)
if (IsUserOrAdmin == false)
if (Request.IsAuthenticated != true) return;
//Get the Membership Information from the property editors
User.Membership = (UserMembership)membershipForm.DataSource;
User.Membership.Approved = false;
The very last line, OnMembershipUnAuthorized raises the Unauthorized User Event.
In my situation, the user being removed from a child portal won't always be fully deleted or soft deleted. The code above comes from DesktopModules/Admin/Security/Membership.ascx.cs.
All I really need to do is disapprove the user for them to be removed from the child portal. Only in the event of fully leaving the company for whatever reason, would they also be soft deleted in Portal 0.
So the question is, do I even need to raise the OnMembershipUnAuthorized event in this case? I think not.
I'm thinking a few lines of code to set up a UserInfo object for them, within this just use the Memberhip.Approve method to set it to false for the child portal and call it a day.
in the event of full removal, etc. do the same for Portal 0 and all other portals the Supervisor is an admin on.
Who's the Go To Guru on these questions? :) I had to invent some tags here... not sure of how to use them really ...