Changing the default page based on security group in SharePoint - sharepoint

We have a SharePoint site collection. In this site collection we have a home site and 6 other sites. Each of these sites belongs to a department in our company. Right now if you are a member of department A security group you would see homepage and your department site/tab when you navigate to the site. What they want me to do is to redirect the users directly to the department site/tab whenever they navigate to the site.
Is there any way to do this without coding or with coding?

With coding, you could write a very simple web control and include that on the home page. It would test which group a user belongs to and then redirect accordingly.
There are various ways to check if a user belongs to a group. One method is to get a reference to each SPGroup object and use SPGroup.ContainsCurrentUser.
You might also like to consider creating a custom list that maps SPGroup name against department URL, so you can manage behaviour of the control through the SharePoint UI.

Related

Is there a way to restrict read access of a Folder to a User/Group in SharePoint Online

I have created two groups in SharePoint Online
The following groups are:
Finance Group
HR Group
Added two users under Finance Group, they are like following:
a. John
b. Joe
Also added two users under HR Group, they are like following:
a. Margaret
b. Janet
Admin has created created a folder called Photos, I want the folder to be disabled for a Group/user(i.e the photos folder should not shown for a Group I chose (e.g Finance Group) or for a User (e.g John))
Is there a way in SharePoint Online to restrict read access for a User/Group?
Your best way to do this would be to use target audiences for your subfolder.
Within your library settings, go to audience targeting settings and enable audience targeting.
Navigate to your subfolder, open the subfolder, and edit the page, it will then appear similarly to a webpart.
Within the edit webpart dialog on the right, navigate to advanced and the last field is audience targeting.
You may need to make a new permissions group if using a group of people or simply select an individual person.
That's it.

Liferay Page Administrator

I need that each page is administered by one person or group of persons.
Do I need to create one role each for every page I have to administer(Page1 administrator, page 2 administrator) or can I just create one generic role named "Page Administrator" and have some thing like a user having Page Administrator role can manage only page1 and similarly another user having the same "Page Administrator" can only manage "page2"? This is to avoid creating as many roles as there are pages in the system.
it depends... The easiest and most maintainable way to assign permissions in Liferay is through roles per site. If you have 1 page per site, you're good to go with a site role. You can build the navigation from many different sites, an example is this POC app by yours truly.
If you create roles (or teams) per page, be aware that page management is a different beast than content management: All of the pages of one site share the same content. Thus it might be hard to solve, if you also want the page administrators to maintain the content.

Sharepoint Requirement Login?

I am setting up a SharePoint Online instance and I have some requirements that I do not know how to implement.
These are some of the requirements:
When a user logs into SharePoint, the user should select a country and city. Depending on the selected country and city, the corresponding site and subsites should appear.
Create folders that users cannot delete.
I don't know what is the process to create the first point and the option to disable in the second, if some of you know a tutorial or maybe knows how to do it, I would really appreciate it.
(1) One approach is modifying the welcome page through SharePoint Designer to contain HTML selectors for country and city. Based on the selected country and city, you can then redirect to the proper site using JavaScript.
(2) Creating folders that users can't delete requires custom .NET code. You can't run custom .NET code directly in SharePoint Online. Depending on your requirements, you need to create the folders using a console application or a custom app part. The console app or the app part can create the folders and remove permissions on the folders.

Location and visibility of the SharePoint users group

I created a group of users in the SharePoint subsite, i.e. pressed Create Group button on a ribbon of this particular subsite Permissions page. Nevertheless I see this group in the list of groups in my parent site.
Does this mean that all SharePoint groups are stored on the site collection level? Meaning that all groups are relevant to any site in the collection?
If this is so, what were the reasons for this design?
Yes, you can access all groups from the main site and any website in the collection. And I guess the reason is to give you the ability to use any group in any website under your collection.

Add Custom Meta Data to a Team Site Programmatically

I have been asked to write a custom webpage in a web application integrated into a MOSS 2007 solution to allow users to create a teamsite using a custom template. No problem.
However, the user must have the ability to assign custom meta tags to the created team site to allow for specific searches, i.e. to assign country ("USA") and department ("Accounting") tags. Can anyone suggest a way of adding custom properties to the newly created team site via the SharePoint API?
Thanks, MagicAndi
There are 2 options:
You can use the Propertybag (SPWeb.Properties) of the SPWeb object of the new team site
You can add a list (invisble to users except admins) called "site tags" and add some items in there with key value pair fields i.e. item Country with value "USA" etc.

Resources