Hi,
Thanks for your reply, I have partly been able to do what I want. Currently I have set only Browser permissions on
the Models folder. This prevents the users to save any reports to that folder, instead they are forced to save them
into their My Reports folder.
I have one issue left though. Since I am assigning the Browser permission to the Models folder, and within the
models folder I create one model for each user. This means that when I create a new model it will inherit the
permissions from the Models folders.
This means that everyone will be able to see each others Models, this I would like to prevent. Therefor my question
is this. How can I stop my newly created model from inheriting roles/permission from the parent folder? Instead
I want it to use only the permissions that I set specifically.
Below is the code I use today to create my models:
1 ' Example:
2 ' rs -i ModelUpload.rss -s http://localhost/ReportServer -v path="/Path/To/Data/Source/Folder" -v modelName="My Model" -v modelSourceFile="C:\mymodel.smdl"
3
4 Public Sub Main()
5 rs.Credentials = System.Net.CredentialCache.DefaultCredentials
6
7 If not path.StartsWith("/") Then
8 path = "/" & path
9 End If
10
11 PublishModel(modelName, path, modelSourceFile)
12 End Sub
13
14 Public Sub PublishModel(ByVal modelFilePath as string, byval path as string, byval modelSourceFile as string)
15 Dim definition As [Byte]() = Nothing
16
17 Dim stream As FileStream = File.OpenRead(modelSourceFile)
18 definition = New [Byte](stream.Length) {}
19 stream.Read(definition, 0, CInt(stream.Length))
20 stream.Close()
21
22 rs.CreateModel(modelName, path, definition, Nothing)
23 End Sub
Cheers!