Function

CanEditType

Module

uTemplates

Last Modified

7/15/2014 3:26:44 PM

Scope

Local

Local subprogram to

CanEditLinkType

Declaration

function CanEditType(Template: TTemplate): boolean;

Calls Hierarchy


CanEditType
 └IsUserTemplateEditor

Called-By Hierarchy


                               CanEditType
                         CanEditLinkType┘ 
          TfrmTemplateEditor.InitTrees┘   
       TfrmTemplateEditor.FormCreate┤     
      TfrmTemplateEditor.RefreshData┘     
TfrmTemplateEditor.mnuRefreshClick┘       

Calls

Name Declaration Comments
IsUserTemplateEditor function IsUserTemplateEditor(TemplateID: string; UserID :Int64): boolean; -

Called-By

Name Declaration Comments
CanEditLinkType function CanEditLinkType(LinkType: TTemplateLinkTypes): boolean; -


Source

646   function CanEditType(Template: TTemplate): boolean;
647   begin
648     if not assigned(Template) then
649       Result := FALSE
650     else
651     if pos(Char(ord(LinkType)+ord('0')), uCanEditLinkTypeResults) > 0 then
652       Result := (pos(Char(ord(LinkType)+ord('A')), uCanEditLinkTypeResults) > 0)
653     else
654     begin
655       Result := IsUserTemplateEditor(Template.ID, User.DUZ);
656       uCanEditLinkTypeResults := uCanEditLinkTypeResults + Char(ord(LinkType)+ord('0'));
657       if Result then
658         uCanEditLinkTypeResults := uCanEditLinkTypeResults + Char(ord(LinkType)+ord('A'));
659     end;
660   end;