Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

StarTeam Security: How to check that user have access to particular view?

31 views
Skip to first unread message

xoiii

unread,
Sep 27, 2010, 8:29:28 AM9/27/10
to
//StartTeam SDK 2005 R2

for j := 0 to Project.Views.Count - 1 do
begin
Item := Project.Views.Item[j];
View := Item as IStView;

if View.HaveAccessRights then
begin

//On that line we have exception
//'The view you are attempting to open contains no visible
folders because of the current security settings'.
RootFolder := View.RootFolder;


Files := RootFolder.getItems(Server.TypeNames.file_);

for k := 0 to Files.Count - 1 do
begin
Item := Files[k];
CurFile := Item as IStFile;
if CurFile.MyLock =
Server.PropertyEnums.MY_LOCK_EXCLUSIVELY_LOCKED_BY_ME then
begin
Application.ProcessMessages;
MemTable.Append;
MemTable.FieldByName('ParentViewName').AsString :=
CurFile.View.ParentView.Name;
MemTable.FieldByName('ViewName').AsString :=
CurFile.View.Name;
MemTable.FieldByName('Path').AsString :=
CurFile.View.Path;
MemTable.FieldByName('FileName').AsString :=
CurFile.Name;
MemTable.FieldByName('Status').AsString :=
CurFile.getEnumDisplayName(Server.PropertyNames.FILE_STATUS,
CurFile.Status);
MemTable.Post; ;
end;
end;

end;
end;

0 new messages