How can I disable Edit Source at my UI
Can override any operator in blender
Unless you are prepared to edit the source code of blender and build without edit souce operator, and remove from ui menu, you can override the operator.  Simply a matter of registering another operator with the same bl_idname.
import bpy

def main(context):
    print(&quot;foo&quot;)

class SimpleOperator(bpy.types.Operator):
    &quot;&quot;&quot;Tooltip&quot;&quot;&quot;
    bl_idname = &quot;ui.editsource&quot;
    bl_label = &quot;No Edit Source&quot;

    @classmethod
    def poll(cls, context):
        return False

    def execute(self, context):
        main(context)
        return {'FINISHED'}

def register():
    bpy.utils.register_class(SimpleOperator)

def unregister():
    bpy.utils.unregister_class(SimpleOperator)
    
if __name__ == &quot;__main__&quot;:
    register()

Now we have an item in the right click menu &quot;No Edit Source&quot;, that does nothing because it will never poll.

The next choice is where and when to run, and register this operator.  As long as it is run after the original operator was registered, it will override the behaviour.
Should you wish to take this further can use python type(...) to override operators en mass. Sample scripts take out any bpy.ops.ui operators.
Edit: Updated for 2.8 (Operator.get_rna -&gt; Operator.get_rna_type)
import bpy

class SimpleOperator(bpy.types.Operator):
    &quot;&quot;&quot;Tooltip&quot;&quot;&quot;
    bl_idname = &quot;ui.editsource&quot;
    bl_label = &quot;No Edit Source&quot;

    @classmethod
    def poll(cls, context):
        return False

classes = []
def register():
    for op in dir(bpy.ops.ui):
        rna = getattr(bpy.ops.ui, op).get_rna_type()
        name = rna.bl_rna.name
        props = {&quot;bl_idname&quot;: &quot;ui.%s&quot; % op,
                 &quot;bl_label&quot;: name,
                 &quot;bl_description&quot;: &quot;Disabled&quot;} #rna.bl_rna.description
        DisOpClass = type(name, (SimpleOperator,), props)
        classes.append(DisOpClass)
        bpy.utils.register_class(DisOpClass)

def unregister():
    for c in classes:
        bpy.utils.unregister_class(c)

if __name__ == &quot;__main__&quot;:
    register()