English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?

Show sites only owned by user
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Show sites only owned by user
#9128
Show sites only owned by user 12 Years, 3 Months ago Karma: 1
Hi Edwin,

I added a menuitem in my user menu for Multisites > Slaves/List

However, I did put the GROUP that it's in and it lists ALL usernames under that group for a filter. But I don't want User-A to be able to see and edit User-B's websites.

When I create the slave site in the backend, I am able to put the "owner" of the site which is a username. How can I just show only the sites "owned" by the logged in user?
buddyq
Expert Boarder
Posts: 106
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#9142
Re: Show sites only owned by user 12 Years, 3 Months ago Karma: 54
From the front-end, a normal "register" user can only see its own websites.

Only the Super Administrator can see the list of all users.

So login with a "registered" user to see the screen displayed.

If you autorised anonymous users to display the list in this case, you see all the websites.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#9151
Re: Show sites only owned by user 12 Years, 3 Months ago Karma: 1
Okay, I thought I tried that but I guess I didn't. It works if I change the user to "Registered". However, most of my users are ADMINS, isSuperAdmin is a little misleading since Administrators are not actually Super Admins. Is there a way to show only owned to administrators and show ALL to actual Super Admins? Would be nice if we could choose which access level can see only their own sites. Instead of being forced to make users "Registered".

UPDATE

I need to keep my uses as Administrators because, when they create their sites, they are in "offline" mode. Only an Admin can login to an offline site. Not a registered user. However, I need them to be able to see only their sites as Admins. They are not Super Admins, so "isSuperAdmin" is not correct. Can we make it just for SuperAdmins?

I checked the isSuperAdmin function in the admin part and it seems correct. However, the frontend function could be more specific for the uig instead of just an 'edit' permission.

Code:

// Check if this is a super administrator or an administrator
$user = JFactory::getUser();
   $isSuperAdmin = false;
      if ($user->authorize( 'com_multisites', 'edit')) {
       $isSuperAdmin = true;
      }



UPDATE 2

Fixed it with changing the code in slaves.php to be like the code in the admin part to detect an actual SuperAdmin, not just 'edit' permission. Where does that 'edit' permission come from? Is that a setting somewhere so I don't have to tweak the core code? Or can you add it as an update?
buddyq
Expert Boarder
Posts: 106
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/02/02 20:26 By buddyq.
The administrator has disabled public write access.
 
#9175
Re: Show sites only owned by user 12 Years, 3 Months ago Karma: 1
Edwin,

When I login as a user and create a new site from the front-end it does not show in the list of site owned by the user. I am able to see it from the backend and the owner is the user I used to create the site. Why doesn't it show me the new sites created in the front-end list? Also, prefix still does NOT show and the alias is also missing on the front-end list.

Buddy
buddyq
Expert Boarder
Posts: 106
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#9183
Re: Show sites only owned by user 12 Years, 3 Months ago Karma: 54
To see the list of site, you need to use the "list website" in the JMS menu type and you will have the list of "yourself" and not all the list.

If you want to see all the list, you have to select the "anonymous" user.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla