List

Today I was tasked with creating a custom list. Pretty normal so far, right? Here’s where it gets interesting. The users that post should not be able to see any of the posts (including their own) and only receive an email confirmation of their own posts. Enter the cunning use of CSS. Yes, it’s security by obscurity, but it is extremely effective and utilizes SharePoint’s security trimming abilities.

Ingredients:

  1. Minor HTML knowledge
  2. Minor CSS knowledge
  3. Ability to create a SharePoint custom list
  4. Know-how to edit a SharePoint Page
  5. Knowledge of how to add and edit a Content Editor Web Part
  6. Some experience working with SharePoint Audiences

Prep time:

60-seconds + whatever it takes to create your custom list

Directions:

  1. Create a custom list
  2. Edit the custom list page
  3. Add a content editor web part (CEWP)
  4. Locate the HTML Tag, ID or Class of the section of the page you want to hide
  5. Add the following to the CEWP: <style>.ms-listviewtable {display: none;}</style>
  6. Edit the CEWP and add the appropriate audience under the +Advanced section
  7. Serve and enjoy

How it works:

If a user account is a member of the specified audience the CEWP is applied to the page and the HTML section is hidden. If a user account is not a member of the specified audience, the CEWP is not applied and the content is visible.

Happy hiding!

SS

 

  Posts

February 14th, 2018

Invincible workflows

Today I encountered a list item that had two instances of the same workflow, both stuck on the first step. […]

May 17th, 2017

The case of the missing App Launcher

Today I deleted and recreated a SharePoint 2016 Web application and recreated it, without issue. Well, except that the new […]

March 10th, 2017

The server failed to process the request. Aka, the SharePoint version of PCLoadLetter

It’s Friday so I’ll keep this short The ongoing power struggle between SharePoint and it’s tamers continues. Today we’re faces […]

March 3rd, 2017

Search, search, search, all the day long…

So, I just rolled SharePoint 2016 into a test environment and launch Central Admin, and the first thing my eyes […]

May 5th, 2016

Oh, happy day!

SharePoint 2016 has been released to MSDN! Time to practice different upgrade strategies and see what this baby can do! […]

March 29th, 2016

Branding Gone Wild

Today I ran into a problematic sub-site in my SharePoint 2013 farm. This sub-site, named “Test”, was where I had […]

March 14th, 2016

SharePoint 2016 RTM Released Today

Today marks the beginning of the next chapter for SharePoint as Microsoft released SharePoint 2016 RTM today. Ready to get […]

October 13th, 2015

A SharePoint game of hide and seek!

Today I was tasked with creating a custom list. Pretty normal so far, right? Here’s where it gets interesting. The […]

October 9th, 2015

My first Hadoop install.

So, I built my first single node Hadoop cluster today using Ubuntu 14.04 LTS, Hadoop 2.7.1 and Oracle Java 1.7.0_80 […]

September 3rd, 2015

Creating a date dimension table in MS SQL

TSQL Script #1 – Create dbo.DimDate table 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849BEGIN TRY     DROP TABLE [dbo].[DimDate] END TRY BEGIN CATCH     […]