Dev Team Assemble

Evil beware!
Add to Technorati Favorites

Archive

Tag: Development

Inside the Microsoft.SharePoint namespace there is the SPBasePermissions enumeration. It specifies the built-in permissions available in Windows SharePoint Services / MOSS 2007.  This was taken from the MSDN site, but I am posting it here because sometimes they move content around and I can't find it...ha ha you can't fool me Microsoft!!!

Using the enumerations below you can wrap some markup on your page in an SPSecurityTrimmedControl like so:

<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="CreateGroups">

and only allow users with the defined permission to see the contents of the security trimming control.

Member name Description
AddAndCustomizePages Add, change, or delete HTML pages or Web Part Pages, and edit the Web site using a Windows SharePoint Services–compatible editor.
AddDelPrivateWebParts Add or remove personal Web Parts on a Web Part Page.
AddListItems Add items to lists, add documents to document libraries, and add Web discussion comments.
ApplyStyleSheets Apply a style sheet (.css file) to the Web site.
ApplyThemeAndBorder Apply a theme or borders to the entire Web site.
ApproveItems Approve a minor version of a list item or document.
BrowseDirectories Enumerate files and folders in a Web site using Microsoft Office SharePoint Designer 2007 and WebDAV interfaces.
BrowseUserInfo View information about users of the Web site.
CancelCheckout Discard or check in a document which is checked out to another user.
CreateAlerts Create e-mail alerts.
CreateGroups Create a group of users that can be used anywhere within the site collection.
CreateSSCSite Create a Web site using Self-Service Site Creation.
DeleteListItems Delete items from a list, documents from a document library, and Web discussion comments in documents.
DeleteVersions Delete past versions of a list item or document.
EditListItems Edit items in lists, edit documents in document libraries, edit Web discussion comments in documents, and customize Web Part Pages in document libraries.
EditMyUserInfo Allows a user to change his or her user information, such as adding a picture.
EmptyMask Has no permissions on the Web site. Not available through the user interface.
EnumeratePermissions Enumerate permissions on the Web site, list, folder, document, or list item.
FullMask Has all permissions on the Web site. Not available through the user interface.
ManageAlerts Manage alerts for all users of the Web site.
ManageLists Create and delete lists, add or remove columns in a list, and add or remove public views of a list.
ManagePermissions Create and change permission levels on the Web site and assign permissions to users and groups.
ManagePersonalViews Create, change, and delete personal views of lists.
ManageSubwebs Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.
ManageWeb Grant the ability to perform all administration tasks for the Web site as well as manage content. Activate, deactivate, or edit properties of Web site scoped Features through the object model or through the user interface (UI). When granted on the root Web site of a site collection, activate, deactivate, or edit properties of site collection scoped Features through the object model. To browse to the Site Collection Features page and activate or deactivate site collection scoped Features through the UI, you must be a site collection administrator.
Open Allow users to open a Web site, list, or folder to access items inside that container.
OpenItems View the source of documents with server-side file handlers.
UpdatePersonalWebParts Update Web Parts to display personalized information.
UseClientIntegration Use features that launch client applications; otherwise, users must work on documents locally and upload changes.
UseRemoteAPIs Use SOAP, WebDAV, or Microsoft Office SharePoint Designer 2007 interfaces to access the Web site.
ViewFormPages View forms, views, and application pages, and enumerate lists.
ViewListItems View items in lists, documents in document libraries, and view Web discussion comments.
ViewPages View pages in a Web site.
ViewUsageData View reports on Web site usage.
ViewVersions View past versions of a list item or document.

Technorati Tags: , , ,

So I have been working on setting up a Linux box with PHP5 and mysql mostly just to fart around with but also because I like learning how to do these things. I was having a hell of a time getting PHP and mysql to install properly on my distro - ubuntu 8

I originally installed PHP using apt-get and then installed mysql doing the same but was having issues getting them to work...no big shocker considering I am still fairly new to Linux. Eventually I did the following to get everything working, well so far anyway :)

Here it is:

1. sudo tasksel install lamp-server - this installs the entire LAMP stack (Linux-Apache-MySQL-PHP) and does most of the work for you (i like this)

2. sudo apt-get install phpmyadmin - configure it for apache2 (installed above) this helped me get rid of the Fatal error: Call to undefined function: mysql_connect() I was getting...basically php was not configured to speak to mysql

3. I really cheated on this one because I was getting the following error Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111 like any good linux noob I decided to google that up and came up with an article located here that worked like a charm. Here are the steps:

* sudo gedit /etc/mysql/my.conf - comment the line corresponding to ‘bind-address’
* sudo gedit config.inc.php - in the /etc/phpmyadmin folder
* add or edit a line $cfg['Servers'][$i]['host'] = ‘localhost’;
* restart mysql using sudo /etc/init.d/mysql restart

Anyway...HTH

Technorati Tags: , , , ,

If you are like me and have experienced this amazing error...here is how you can pinpoint the problem....change the SafeMode tag in the web.config file to enable the CallStack attribute

<safemode callstack="true" maxcontrols="200">

Then turn the customErrors mode to OFF. This should help you determine the problem.

Technorati Tags: , , ,

From November 2008:

Whew...its been a long week and its only Thursday. This years conference was much the same as last years with the exception of being held in various portions of the Mandalay Bay convention center as opposed to on one floor. This made for lots and lots and lots and lots of walking. But I'm still young (yes i am) so it makes for good excercise to walk off all the food they shovel in your mouth.

Most of the sessions I attended were really good with the exception of a couple. I wouldn't blame the speakers because these problems were mostly due to technical issues like the computers not working, the projectors broken or feedback in the presenters microphone sort of thing. All in all there were some great things presented this week.

Some of the sessions that really stuck out were:

Kimberly Tripp - Index Internals and Usage
This was a great session that talked about thins like SQL Server Statistics, Query Optimization, Types of indexes, diminishing returns on performance, etc. Of all the session I think this one stood out the most and because it is probably the most relevant for me right now being one of the "SQL Server DBA" for my company (Christie Digital). I say it that way because its a committee based DBA :)

Rick Strahl - Using WCF for JSON and REST Services with ASP.Net

Great session....last one of the conference for me so it really sticks out but essentially this covers the next gen replacement for ASMX or first gen webservices in the .NET Framework.

John Papa - Practical Strategies with the Entity Framework

For me this was an introduction to the Entity Framework that was released in VS 2008 SP1. John did a great job of quickly introducing the technology and getting on to the meat and potatoes of what we were there to discuss. There was a good discussion on how to use the IDE to build the data mappings and what happens after you make changes to the backend server, which coinceidently can be any data source...not just SQL as Linq to SQL supports.

Things I would change...(and only because its my blog and I can say whatever I want!!!)

...the time between sessions was ridiculous...one hour or in some cases and hour and a half is just way too long. They could have added an extra session or two to the day. I realize they want you in the expo hall but they could have extended the day to facilitate that or leave it open all day and then some people may skip a couple of sessions here and there to go and see what the vendors are offering. this was my gripe last year and its my gripe this year. Its probably going to be the thing that keeps me from going to this in the future.

...provide video or podcasts of the sessions so we can take in the whole conference...even the sessions we didn't get to go to. I see there point about this being intellectual property and the speakers are consultants and this is their livelyhood but I mean if they are willing to teach this at a conference...and we pay to see it...shouldn't we be entitled to review this information after the fact? Maybe they will supply it on their site (i heard they were recording the sessions this year).

...ease up on the food. Damn, there was too much...I ate too much...I felt stuffed the whole time...I guess this is really my fault! Okay dont change that :)

Technorati Tags: , , , , , ,

I have never in my life dealt with or had the "pleasure" of using a tool quite like Sharepoint Designer 2007 [EDIT : 2010 product is MUCH better]. First off I am a developer...so can they roll this thing into Visual Studio already? maybe then it will behave like my usual IDE...you know intellisense, fade away tool boxes and solution explorer. (Some of these issues are sharepoint itself but...this app is where i figured it out so i am adding it here)
So what makes me hate it?

...hmm did you know that you have to leave the ListFormWebPart on all the edit, insert and display forms for a list even if you want to customize them? Seems kind of odd to me and quite frankly where is this documented...shouldn't SPD at least say something to that effect...or dammit MS add it as a comment on the page somewhere.

...how about leaving my HTML code alone when i am done formatting it please!!!! Its like I am working in VS2002 again...no thanks

...the CustomListForm web part does not give you the ability to attach files...even though its right there on the toolbar it gives you the nice "You cannot attach a file because the form was customized". Thanks captain obvious...I think this is one of those sick jokes where every time you click on it a counter in Redmond increments by one and some sick developer is there laughing his ass off...heres to you buddy! Kudos to Marc Davis for his workaround posted here

...isn't it funny how the css file core.css is always the last css added to the list. Sure you can bypass it with the Alternate stylesheeet and/or using a hard coded link tag...but that just seems dumb to me.

...can I have an easier way to develop and debug code in sharepoint...sure I know I can build, deploy to the GAC and attach....but its a bit of a pain in the ass.

...Customized file and uncustomized files. Yes i get the gist of it and i believe this is a good thing....scenario - I have made numerous edits to a file - I choose to revert to the site definition - I don't get my original file back...I get some hybrid bastardized file that is completely useless to me...ummmm....again...not funny.

- I had a problem with one of my lists (pertaining to the ListFormWebPart not being there) and I was looking around on the internet...here is what I found this article here you can read it if you want but it basically says hey...just delete your list and recreate it....HA HA HA I love those simple "fixes".

So these are my ramblings...I am kinda stuck with SharePoint 2007 now but if they could fix some of these very-time consuming problems it would make mine and judging from the problems people are having online a lot of other peoples jobs a lot easier. I mean isn't that what Microsoft has been promising all this time...

I'll stop now...happy SharePointing.

Technorati Tags: , , ,

This was taken from the following url: http://forums.msdn.microsoft.com/en-US/sharepointcustomization/thread/8ddb9f2e-12ca-4285-9bd1-1a29e0d5efc4/

Using a SharePoint Data View Drop down list This is the following syntax used to connect to an SPDatasource

< runat="server" id="dvddl{$Pos}" fieldname="HRRecruitRequisition" datasourceid="Requisitions2" datatextfield="Title" datavaluefield="ID" bind="{ddwrt:DataBind('i',concat('dvddl', $Pos), 'SelectedValue', 'SelectedIndexChanged', 'ID', ddwrt:EscapeDelims(string(@ID)), '@HRRecruitRequisition')}" appenddatabounditems="True" width="250px">

The meat and potatoes of this is in the __designer:Bind and FieldName attiributes. Obviously the DataSourceID needs to match the ID of the SPDataSource you are looking o display in the dropdown.

Technorati Tags: , , , ,

I came across this neat tool (well a colleague of mine did and told me about it) from Helicon called URL Rewriter. Basically it allows you to use an ISAPI filter to rewrite the url that the server uses to work with in IIS and is essentially a copy of the mod_rewrite utility available in Apache.

It uses Regular expressions...so if you are not an expert in those (as I am clearly not) then this little tidbit of code may help. It allows you to rewrite the url that comes in as subdomain.domain.com as domain.com/subdomain. The top portion is the header and sets up logging and such...the real meat is the last two lines.

Here it is

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.48
RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 200
RewriteBase
ReWriteLog C:\rewrite.log
RewriteLogLevel 9

RewriteCond %{HTTP_HOST} ^(?!www)(\w+).christiedigital\.com
RewriteRule (.*) /%1/$1 [L]

Hope this helps

Technorati Tags: , , , ,

Funny thing. I was trying to create a custom menu on the side of the default.master page in SharePoint. I can't seem to find anyway to add security to pages so that they are trimmed out properly when the menu loads.....(help me please).

So I removed some of the xslt and added my own methods for adding a couple of hyperlink controls and having them link to the right pages. Apparently this is not a good thing to do....somehow the session state stopped working after this????  Whats nice is reverting to site definition fixed it so...at least it works again. but I am back to my original problem, which is security trimming at the page level. More work to be done on this...

FYI as a followup before I forget...looks like this was related to me using a server control as opposed to a web part on the page. After changing the controls to webparts I was able to bastardized the page to my hearts content.

Technorati Tags: , ,