Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I would like to allow Linked and URL attachments but prevent embedded attachments.

enter image description here

The ManageAttachments enter image description here privilege seems to be all or nothing. Does anyone else require this particular configuration? How did you accomplish it?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

This is what I came up as a workaround: adding a trigger to the JTX_JOB_ATTACHMENTS table.

CREATE TRIGGER dbo.TRG_BLOCKEMBEDDED_ATTCH
   ON  dbo.JTX_JOB_ATTACHMENTS
   AFTER INSERT,UPDATE
AS 
BEGIN
    SET NOCOUNT ON;

    DECLARE @updateCount int
    DECLARE @insertCount int 

    select @updateCount = count(*) from deleted where ATTACHMENT_DATA is not null;
    select @insertCount = count(*) from inserted where ATTACHMENT_DATA is not null;

    IF (@insertCount + @updateCount) > 0
    BEGIN
        RAISERROR('Embedded attachments cannot be made to this WMX repository.', 16, 1);
        ROLLBACK TRANSACTION
    END 
END
GO

In Workflow Manager, when a user attempts to add an embedded attachment, they receive this error message:

Error message in Workflow Manager

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.